Filename | /opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Meta/Method/Constructor.pm |
Statements | Executed 29 statements in 751µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 246µs | 2.49ms | new | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 12µs | 2.24ms | _initialize_body | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 11µs | 11µs | BEGIN@3 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 10µs | 51µs | BEGIN@16 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 9µs | 14µs | BEGIN@11 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 9µs | 52µs | BEGIN@15 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 9µs | 150µs | BEGIN@18 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 9µs | 44µs | BEGIN@14 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 8µs | 23µs | BEGIN@10 | Moose::Meta::Method::Constructor::
1 | 1 | 1 | 4µs | 4µ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 11µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called:
# once (11µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5 | ||||
4 | 1 | 7µs | $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 39µs | 1 | 11µs | } # spent 11µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3 |
6 | { | ||||
7 | 2 | 1µs | $Moose::Meta::Method::Constructor::VERSION = '2.1005'; | ||
8 | } | ||||
9 | |||||
10 | 2 | 29µs | 2 | 38µs | # spent 23µs (8+15) within Moose::Meta::Method::Constructor::BEGIN@10 which was called:
# once (8µs+15µs) by Moose::Meta::Class::BEGIN@25 at line 10 # spent 23µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10
# spent 15µs making 1 call to strict::import |
11 | 2 | 28µs | 2 | 19µs | # spent 14µs (9+5) within Moose::Meta::Method::Constructor::BEGIN@11 which was called:
# once (9µs+5µs) by Moose::Meta::Class::BEGIN@25 at line 11 # spent 14µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11
# spent 5µs making 1 call to warnings::import |
12 | |||||
13 | 2 | 28µs | 1 | 4µs | # spent 4µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called:
# once (4µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13 # spent 4µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13 |
14 | 2 | 41µs | 2 | 79µs | # spent 44µs (9+35) within Moose::Meta::Method::Constructor::BEGIN@14 which was called:
# once (9µs+35µs) by Moose::Meta::Class::BEGIN@25 at line 14 # spent 44µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14
# spent 35µs making 1 call to Exporter::import |
15 | 2 | 32µs | 2 | 95µs | # spent 52µs (9+43) within Moose::Meta::Method::Constructor::BEGIN@15 which was called:
# once (9µs+43µs) by Moose::Meta::Class::BEGIN@25 at line 15 # spent 52µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@15
# spent 43µs making 1 call to Exporter::import |
16 | 2 | 36µs | 2 | 92µs | # spent 51µs (10+41) within Moose::Meta::Method::Constructor::BEGIN@16 which was called:
# once (10µs+41µs) by Moose::Meta::Class::BEGIN@25 at line 16 # spent 51µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@16
# spent 41µs making 1 call to Exporter::import |
17 | |||||
18 | 1 | 400ns | # spent 150µs (9+141) within Moose::Meta::Method::Constructor::BEGIN@18 which was called:
# once (9µs+141µs) by Moose::Meta::Class::BEGIN@25 at line 19 | ||
19 | 1 | 249µs | 2 | 292µs | 'Class::MOP::Method::Constructor'; # spent 150µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18
# spent 141µs making 1 call to base::import |
20 | |||||
21 | # spent 2.49ms (246µs+2.24) within Moose::Meta::Method::Constructor::new which was called:
# once (246µs+2.24ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm | ||||
22 | 1 | 700ns | my $class = shift; | ||
23 | 1 | 3µs | my %options = @_; | ||
24 | |||||
25 | 1 | 600ns | my $meta = $options{metaclass}; | ||
26 | |||||
27 | 1 | 1µs | (ref $options{options} eq 'HASH') | ||
28 | || $class->throw_error("You must pass a hash of options", data => $options{options}); | ||||
29 | |||||
30 | 1 | 900ns | ($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 | 5µ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 | 228µs | 1 | 2µs | weaken($self->{'associated_metaclass'}); # spent 2µs making 1 call to Scalar::Util::weaken |
47 | |||||
48 | 1 | 2µs | 1 | 2.24ms | $self->_initialize_body; # spent 2.24ms making 1 call to Moose::Meta::Method::Constructor::_initialize_body |
49 | |||||
50 | 1 | 5µs | return $self; | ||
51 | } | ||||
52 | |||||
53 | ## method | ||||
54 | |||||
55 | # spent 2.24ms (12µs+2.23) within Moose::Meta::Method::Constructor::_initialize_body which was called:
# once (12µs+2.23ms) by Moose::Meta::Method::Constructor::new at line 48 | ||||
56 | 1 | 300ns | my $self = shift; | ||
57 | 1 | 11µs | 1 | 2.23ms | $self->{'body'} = $self->_generate_constructor_method_inline; # spent 2.23ms making 1 call to Class::MOP::Method::Constructor::_generate_constructor_method_inline |
58 | } | ||||
59 | |||||
60 | 1 | 4µs | 1; | ||
61 | |||||
62 | # ABSTRACT: Method Meta Object for constructors | ||||
63 | |||||
64 | __END__ |