Filename | /Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Method/Constructor.pm |
Statements | Executed 29 statements in 474µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 133µs | 15.1ms | new | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 10µs | 14.9ms | _initialize_body | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 8µs | 8µs | BEGIN@3 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 7µs | 39µs | BEGIN@15 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 7µs | 32µs | BEGIN@16 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 6µs | 30µs | BEGIN@14 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 6µs | 9µs | BEGIN@11 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 6µs | 98µs | BEGIN@18 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 6µs | 16µs | BEGIN@10 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 2µs | 2µs | BEGIN@13 | Moose::Meta::Method::Constructor::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package Moose::Meta::Method::Constructor; | ||||
3 | # spent 8µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called:
# once (8µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5 | ||||
4 | 1 | 7µs | $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 27µs | 1 | 8µs | } # spent 8µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3 |
6 | { | ||||
7 | 2 | 800ns | $Moose::Meta::Method::Constructor::VERSION = '2.1005'; | ||
8 | } | ||||
9 | |||||
10 | 2 | 22µs | 2 | 26µs | # spent 16µs (6+10) within Moose::Meta::Method::Constructor::BEGIN@10 which was called:
# once (6µs+10µs) by Moose::Meta::Class::BEGIN@25 at line 10 # spent 16µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10
# spent 10µs making 1 call to strict::import |
11 | 2 | 18µs | 2 | 12µs | # spent 9µs (6+3) within Moose::Meta::Method::Constructor::BEGIN@11 which was called:
# once (6µs+3µs) by Moose::Meta::Class::BEGIN@25 at line 11 # spent 9µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11
# spent 3µs making 1 call to warnings::import |
12 | |||||
13 | 2 | 18µs | 1 | 2µs | # spent 2µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called:
# once (2µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13 # spent 2µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13 |
14 | 2 | 27µs | 2 | 53µs | # spent 30µs (6+23) within Moose::Meta::Method::Constructor::BEGIN@14 which was called:
# once (6µs+23µs) by Moose::Meta::Class::BEGIN@25 at line 14 # spent 30µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14
# spent 23µs making 1 call to Exporter::import |
15 | 2 | 20µs | 2 | 71µs | # spent 39µs (7+32) within Moose::Meta::Method::Constructor::BEGIN@15 which was called:
# once (7µs+32µs) by Moose::Meta::Class::BEGIN@25 at line 15 # spent 39µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@15
# spent 32µs making 1 call to Exporter::import |
16 | 2 | 23µs | 2 | 57µs | # spent 32µs (7+25) within Moose::Meta::Method::Constructor::BEGIN@16 which was called:
# once (7µs+25µs) by Moose::Meta::Class::BEGIN@25 at line 16 # spent 32µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@16
# spent 25µs making 1 call to Exporter::import |
17 | |||||
18 | 1 | 200ns | # spent 98µs (6+92) within Moose::Meta::Method::Constructor::BEGIN@18 which was called:
# once (6µs+92µs) by Moose::Meta::Class::BEGIN@25 at line 19 | ||
19 | 1 | 166µs | 2 | 189µs | 'Class::MOP::Method::Constructor'; # spent 98µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18
# spent 92µs making 1 call to base::import |
20 | |||||
21 | # spent 15.1ms (133µs+14.9) within Moose::Meta::Method::Constructor::new which was called:
# once (133µs+14.9ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm | ||||
22 | 1 | 400ns | my $class = shift; | ||
23 | 1 | 2µs | my %options = @_; | ||
24 | |||||
25 | 1 | 400ns | my $meta = $options{metaclass}; | ||
26 | |||||
27 | 1 | 900ns | (ref $options{options} eq 'HASH') | ||
28 | || $class->throw_error("You must pass a hash of options", data => $options{options}); | ||||
29 | |||||
30 | 1 | 600ns | ($options{package_name} && $options{name}) | ||
31 | || $class->throw_error("You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT"); | ||||
32 | |||||
33 | 1 | 4µs | my $self = bless { | ||
34 | 'body' => undef, | ||||
35 | 'package_name' => $options{package_name}, | ||||
36 | 'name' => $options{name}, | ||||
37 | 'options' => $options{options}, | ||||
38 | 'associated_metaclass' => $meta, | ||||
39 | 'definition_context' => $options{definition_context}, | ||||
40 | '_expected_method_class' => $options{_expected_method_class} || 'Moose::Object', | ||||
41 | } => $class; | ||||
42 | |||||
43 | # we don't want this creating | ||||
44 | # a cycle in the code, if not | ||||
45 | # needed | ||||
46 | 1 | 120µs | 1 | 800ns | weaken($self->{'associated_metaclass'}); # spent 800ns making 1 call to Scalar::Util::weaken |
47 | |||||
48 | 1 | 2µs | 1 | 14.9ms | $self->_initialize_body; # spent 14.9ms making 1 call to Moose::Meta::Method::Constructor::_initialize_body |
49 | |||||
50 | 1 | 4µs | return $self; | ||
51 | } | ||||
52 | |||||
53 | ## method | ||||
54 | |||||
55 | # spent 14.9ms (10µs+14.9) within Moose::Meta::Method::Constructor::_initialize_body which was called:
# once (10µs+14.9ms) by Moose::Meta::Method::Constructor::new at line 48 | ||||
56 | 1 | 400ns | my $self = shift; | ||
57 | 1 | 9µs | 1 | 14.9ms | $self->{'body'} = $self->_generate_constructor_method_inline; # spent 14.9ms making 1 call to Class::MOP::Method::Constructor::_generate_constructor_method_inline |
58 | } | ||||
59 | |||||
60 | 1 | 2µs | 1; | ||
61 | |||||
62 | # ABSTRACT: Method Meta Object for constructors | ||||
63 | |||||
64 | __END__ |