| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose/Meta/Method/Constructor.pm |
| Statements | Executed 23 statements in 259µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 72µs | 2.04ms | Moose::Meta::Method::Constructor::new |
| 1 | 1 | 1 | 8µs | 10µs | Moose::Meta::Method::Constructor::BEGIN@4 |
| 1 | 1 | 1 | 7µs | 1.97ms | Moose::Meta::Method::Constructor::_initialize_body |
| 1 | 1 | 1 | 5µs | 86µs | Moose::Meta::Method::Constructor::BEGIN@12 |
| 1 | 1 | 1 | 4µs | 25µs | Moose::Meta::Method::Constructor::BEGIN@7 |
| 1 | 1 | 1 | 4µs | 7µs | Moose::Meta::Method::Constructor::BEGIN@5 |
| 1 | 1 | 1 | 4µs | 25µs | Moose::Meta::Method::Constructor::BEGIN@9 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose::Meta::Method::Constructor; | ||||
| 2 | 1 | 300ns | our $VERSION = '2.1605'; | ||
| 3 | |||||
| 4 | 2 | 15µs | 2 | 11µs | # spent 10µs (8+2) within Moose::Meta::Method::Constructor::BEGIN@4 which was called:
# once (8µs+2µs) by Moose::Meta::Class::BEGIN@16 at line 4 # spent 10µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@4
# spent 2µs making 1 call to strict::import |
| 5 | 2 | 15µs | 2 | 10µs | # spent 7µs (4+3) within Moose::Meta::Method::Constructor::BEGIN@5 which was called:
# once (4µs+3µs) by Moose::Meta::Class::BEGIN@16 at line 5 # spent 7µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@5
# spent 3µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 2 | 16µs | 2 | 45µs | # spent 25µs (4+20) within Moose::Meta::Method::Constructor::BEGIN@7 which was called:
# once (4µs+20µs) by Moose::Meta::Class::BEGIN@16 at line 7 # spent 25µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@7
# spent 20µs making 1 call to Exporter::import |
| 8 | |||||
| 9 | 1 | 2µs | 1 | 21µs | # spent 25µs (4+21) within Moose::Meta::Method::Constructor::BEGIN@9 which was called:
# once (4µs+21µs) by Moose::Meta::Class::BEGIN@16 at line 10 # spent 21µs making 1 call to parent::import |
| 10 | 1 | 13µs | 1 | 25µs | 'Class::MOP::Method::Constructor'; # spent 25µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@9 |
| 11 | |||||
| 12 | 2 | 116µs | 2 | 167µs | # spent 86µs (5+81) within Moose::Meta::Method::Constructor::BEGIN@12 which was called:
# once (5µs+81µs) by Moose::Meta::Class::BEGIN@16 at line 12 # spent 86µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@12
# spent 81µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
| 13 | |||||
| 14 | # spent 2.04ms (72µs+1.97) within Moose::Meta::Method::Constructor::new which was called:
# once (72µs+1.97ms) by Class::MOP::Class::_inline_constructor at line 1464 of Class/MOP/Class.pm | ||||
| 15 | 1 | 900ns | my $class = shift; | ||
| 16 | 1 | 2µs | my %options = @_; | ||
| 17 | |||||
| 18 | 1 | 500ns | my $meta = $options{metaclass}; | ||
| 19 | |||||
| 20 | 1 | 800ns | (ref $options{options} eq 'HASH') | ||
| 21 | || throw_exception( MustPassAHashOfOptions => params => \%options, | ||||
| 22 | class => $class | ||||
| 23 | ); | ||||
| 24 | |||||
| 25 | ($options{package_name} && $options{name}) | ||||
| 26 | 1 | 400ns | || throw_exception( MustSupplyPackageNameAndName => params => \%options, | ||
| 27 | class => $class | ||||
| 28 | ); | ||||
| 29 | |||||
| 30 | my $self = bless { | ||||
| 31 | 'body' => undef, | ||||
| 32 | 'package_name' => $options{package_name}, | ||||
| 33 | 'name' => $options{name}, | ||||
| 34 | 'options' => $options{options}, | ||||
| 35 | 'associated_metaclass' => $meta, | ||||
| 36 | 'definition_context' => $options{definition_context}, | ||||
| 37 | 1 | 3µs | '_expected_method_class' => $options{_expected_method_class} || 'Moose::Object', | ||
| 38 | } => $class; | ||||
| 39 | |||||
| 40 | # we don't want this creating | ||||
| 41 | # a cycle in the code, if not | ||||
| 42 | # needed | ||||
| 43 | 1 | 61µs | 1 | 800ns | weaken($self->{'associated_metaclass'}); # spent 800ns making 1 call to Scalar::Util::weaken |
| 44 | |||||
| 45 | 1 | 1µs | 1 | 1.97ms | $self->_initialize_body; # spent 1.97ms making 1 call to Moose::Meta::Method::Constructor::_initialize_body |
| 46 | |||||
| 47 | 1 | 4µs | return $self; | ||
| 48 | } | ||||
| 49 | |||||
| 50 | ## method | ||||
| 51 | |||||
| 52 | # spent 1.97ms (7µs+1.96) within Moose::Meta::Method::Constructor::_initialize_body which was called:
# once (7µs+1.96ms) by Moose::Meta::Method::Constructor::new at line 45 | ||||
| 53 | 1 | 500ns | my $self = shift; | ||
| 54 | 1 | 6µs | 1 | 1.96ms | $self->{'body'} = $self->_generate_constructor_method_inline; # spent 1.96ms making 1 call to Class::MOP::Method::Constructor::_generate_constructor_method_inline |
| 55 | } | ||||
| 56 | |||||
| 57 | 1 | 2µs | 1; | ||
| 58 | |||||
| 59 | # ABSTRACT: Method Meta Object for constructors | ||||
| 60 | |||||
| 61 | __END__ |