← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:10:39 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP/Module.pm
StatementsExecuted 484 statements in 6.87ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
66224.62ms8.60msClass::MOP::Module::::_instantiate_moduleClass::MOP::Module::_instantiate_module
11186µs104µsClass::MOP::Module::::BEGIN@4Class::MOP::Module::BEGIN@4
11145µs132µsClass::MOP::Module::::BEGIN@5Class::MOP::Module::BEGIN@5
11142µs113µsClass::MOP::Module::::BEGIN@64Class::MOP::Module::BEGIN@64
11140µs11.1msClass::MOP::Module::::BEGIN@14Class::MOP::Module::BEGIN@14
11137µs197µsClass::MOP::Module::::BEGIN@7Class::MOP::Module::BEGIN@7
11136µs166µsClass::MOP::Module::::BEGIN@8Class::MOP::Module::BEGIN@8
0000s0sClass::MOP::Module::::_newClass::MOP::Module::_new
0000s0sClass::MOP::Module::::createClass::MOP::Module::create
0000s0sClass::MOP::Module::::identifierClass::MOP::Module::identifier
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Class::MOP::Module;
3
43100µs2123µs
# spent 104µs (86+18) within Class::MOP::Module::BEGIN@4 which was called: # once (86µs+18µs) by base::import at line 4
use strict;
# spent 104µs making 1 call to Class::MOP::Module::BEGIN@4 # spent 18µs making 1 call to strict::import
53133µs2220µs
# spent 132µs (45+87) within Class::MOP::Module::BEGIN@5 which was called: # once (45µs+87µs) by base::import at line 5
use warnings;
# spent 132µs making 1 call to Class::MOP::Module::BEGIN@5 # spent 87µs making 1 call to warnings::import
6
73105µs2357µs
# spent 197µs (37+160) within Class::MOP::Module::BEGIN@7 which was called: # once (37µs+160µs) by base::import at line 7
use Carp 'confess';
# spent 197µs making 1 call to Class::MOP::Module::BEGIN@7 # spent 160µs making 1 call to Exporter::import
83205µs2295µs
# spent 166µs (36+130) within Class::MOP::Module::BEGIN@8 which was called: # once (36µs+130µs) by base::import at line 8
use Scalar::Util 'blessed';
# spent 166µs making 1 call to Class::MOP::Module::BEGIN@8 # spent 130µs making 1 call to Exporter::import
9
1014µsour $VERSION = '1.11';
11157µs$VERSION = eval $VERSION;
# spent 10µs executing statements in string eval
1214µsour $AUTHORITY = 'cpan:STEVAN';
13
143941µs211.1ms
# spent 11.1ms (40µs+11.0) within Class::MOP::Module::BEGIN@14 which was called: # once (40µs+11.0ms) by base::import at line 14
use base 'Class::MOP::Package';
# spent 11.1ms making 1 call to Class::MOP::Module::BEGIN@14 # spent 11.0ms making 1 call to base::import, recursion: max depth 2, sum of overlapping time 11.0ms
15
16sub _new {
17 my $class = shift;
18 return Class::MOP::Class->initialize($class)->new_object(@_)
19 if $class ne __PACKAGE__;
20
21 my $params = @_ == 1 ? $_[0] : {@_};
22 return bless {
23
24 # from Class::MOP::Package
25 package => $params->{package},
26 namespace => \undef,
27
28 # attributes
29 version => \undef,
30 authority => \undef
31 } => $class;
32}
33
34sub version {
35 my $self = shift;
36 ${$self->get_or_add_package_symbol({ sigil => '$', type => 'SCALAR', name => 'VERSION' })};
37}
38
39sub authority {
40 my $self = shift;
41 ${$self->get_or_add_package_symbol({ sigil => '$', type => 'SCALAR', name => 'AUTHORITY' })};
42}
43
44sub identifier {
45 my $self = shift;
46 join '-' => (
47 $self->name,
48 ($self->version || ()),
49 ($self->authority || ()),
50 );
51}
52
53sub create {
54 confess "The Class::MOP::Module->create method has been made a private object method.\n";
55}
56
57
# spent 8.60ms (4.62+3.98) within Class::MOP::Module::_instantiate_module which was called 66 times, avg 130µs/call: # 42 times (3.10ms+2.50ms) by Moose::Meta::Role::create at line 545 of Moose/Meta/Role.pm, avg 133µs/call # 24 times (1.52ms+1.48ms) by Class::MOP::Class::create at line 527 of Class/MOP/Class.pm, avg 125µs/call
sub _instantiate_module {
584625.06ms my($self, $version, $authority) = @_;
5966364µs my $package_name = $self->name;
# spent 364µs making 66 calls to Class::MOP::Package::name, avg 6µs/call
60
61663.62ms Class::MOP::_is_valid_class_name($package_name)
# spent 3.62ms making 66 calls to Class::MOP::_is_valid_class_name, avg 55µs/call
62 || confess "creation of $package_name failed: invalid package name";
63
643256µs2183µs
# spent 113µs (42+71) within Class::MOP::Module::BEGIN@64 which was called: # once (42µs+71µs) by base::import at line 64
no strict 'refs';
# spent 113µs making 1 call to Class::MOP::Module::BEGIN@64 # spent 71µs making 1 call to strict::unimport
65 scalar %{ $package_name . '::' }; # touch the stash
66 ${ $package_name . '::VERSION' } = $version if defined $version;
67 ${ $package_name . '::AUTHORITY' } = $authority if defined $authority;
68
69 return;
70}
71
72112µs1;
73
74__END__