← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:06 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose/Meta/Method/Constructor.pm
StatementsExecuted 23 statements in 259µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11172µs2.04msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
1118µs10µsMoose::Meta::Method::Constructor::::BEGIN@4Moose::Meta::Method::Constructor::BEGIN@4
1117µs1.97msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
1115µs86µsMoose::Meta::Method::Constructor::::BEGIN@12Moose::Meta::Method::Constructor::BEGIN@12
1114µs25µsMoose::Meta::Method::Constructor::::BEGIN@7Moose::Meta::Method::Constructor::BEGIN@7
1114µs7µsMoose::Meta::Method::Constructor::::BEGIN@5Moose::Meta::Method::Constructor::BEGIN@5
1114µs25µsMoose::Meta::Method::Constructor::::BEGIN@9Moose::Meta::Method::Constructor::BEGIN@9
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Method::Constructor;
21300nsour $VERSION = '2.1605';
3
4215µs211µ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
use strict;
# spent 10µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@4 # spent 2µs making 1 call to strict::import
5215µs210µ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
use warnings;
# spent 7µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@5 # spent 3µs making 1 call to warnings::import
6
7216µs245µ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
use Scalar::Util 'weaken';
# spent 25µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@7 # spent 20µs making 1 call to Exporter::import
8
912µs121µ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
use parent 'Moose::Meta::Method',
# spent 21µs making 1 call to parent::import
10113µs125µs 'Class::MOP::Method::Constructor';
# spent 25µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@9
11
122116µs2167µ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
use Moose::Util 'throw_exception';
# 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
sub new {
151900ns my $class = shift;
1612µs my %options = @_;
17
181500ns my $meta = $options{metaclass};
19
201800ns (ref $options{options} eq 'HASH')
21 || throw_exception( MustPassAHashOfOptions => params => \%options,
22 class => $class
23 );
24
25 ($options{package_name} && $options{name})
261400ns || 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},
3713µ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
43161µs1800ns weaken($self->{'associated_metaclass'});
# spent 800ns making 1 call to Scalar::Util::weaken
44
4511µs11.97ms $self->_initialize_body;
46
4714µ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
sub _initialize_body {
531500ns my $self = shift;
5416µs11.96ms $self->{'body'} = $self->_generate_constructor_method_inline;
55}
56
5712µs1;
58
59# ABSTRACT: Method Meta Object for constructors
60
61__END__