← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:13:02 2010

Filename/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Module.pm
StatementsExecuted 491 statements in 6.91ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
67224.78ms8.73msClass::MOP::Module::::_instantiate_moduleClass::MOP::Module::_instantiate_module
11166µs84µsClass::MOP::Module::::BEGIN@4Class::MOP::Module::BEGIN@4
11142µs115µsClass::MOP::Module::::BEGIN@64Class::MOP::Module::BEGIN@64
11142µs14.8msClass::MOP::Module::::BEGIN@14Class::MOP::Module::BEGIN@14
11138µs107µsClass::MOP::Module::::BEGIN@5Class::MOP::Module::BEGIN@5
11137µs181µsClass::MOP::Module::::BEGIN@8Class::MOP::Module::BEGIN@8
11136µs189µsClass::MOP::Module::::BEGIN@7Class::MOP::Module::BEGIN@7
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
4395µs2102µs
# spent 84µs (66+18) within Class::MOP::Module::BEGIN@4 which was called: # once (66µs+18µs) by base::import at line 4
use strict;
# spent 84µs making 1 call to Class::MOP::Module::BEGIN@4 # spent 18µs making 1 call to strict::import
53102µs2175µs
# spent 107µs (38+68) within Class::MOP::Module::BEGIN@5 which was called: # once (38µs+68µs) by base::import at line 5
use warnings;
# spent 107µs making 1 call to Class::MOP::Module::BEGIN@5 # spent 68µs making 1 call to warnings::import
6
73102µs2343µs
# spent 189µs (36+153) within Class::MOP::Module::BEGIN@7 which was called: # once (36µs+153µs) by base::import at line 7
use Carp 'confess';
# spent 189µs making 1 call to Class::MOP::Module::BEGIN@7 # spent 153µs making 1 call to Exporter::import
83206µs2325µs
# spent 181µs (37+144) within Class::MOP::Module::BEGIN@8 which was called: # once (37µs+144µs) by base::import at line 8
use Scalar::Util 'blessed';
# spent 181µs making 1 call to Class::MOP::Module::BEGIN@8 # spent 144µs making 1 call to Exporter::import
9
1014µsour $VERSION = '1.11';
11163µs$VERSION = eval $VERSION;
# spent 10µs executing statements in string eval
1213µsour $AUTHORITY = 'cpan:STEVAN';
13
143904µs214.8ms
# spent 14.8ms (42µs+14.7) within Class::MOP::Module::BEGIN@14 which was called: # once (42µs+14.7ms) by base::import at line 14
use base 'Class::MOP::Package';
# spent 14.8ms making 1 call to Class::MOP::Module::BEGIN@14 # spent 14.7ms making 1 call to base::import, recursion: max depth 2, sum of overlapping time 14.7ms
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('$VERSION')};
37}
38
39sub authority {
40 my $self = shift;
41 ${$self->get_or_add_package_symbol('$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.73ms (4.78+3.96) within Class::MOP::Module::_instantiate_module which was called 67 times, avg 130µs/call: # 42 times (3.18ms+2.49ms) by Moose::Meta::Role::create at line 545 of Moose/Meta/Role.pm, avg 135µs/call # 25 times (1.59ms+1.46ms) by Class::MOP::Class::create at line 515 of Class/MOP/Class.pm, avg 122µs/call
sub _instantiate_module {
5867548µs my($self, $version, $authority) = @_;
59671.34ms67366µs my $package_name = $self->name;
# spent 366µs making 67 calls to Class::MOP::Package::name, avg 5µs/call
60
6167706µs673.59ms Class::MOP::_is_valid_class_name($package_name)
# spent 3.59ms making 67 calls to Class::MOP::_is_valid_class_name, avg 54µs/call
62 || confess "creation of $package_name failed: invalid package name";
63
643231µs2188µs
# spent 115µs (42+73) within Class::MOP::Module::BEGIN@64 which was called: # once (42µs+73µs) by base::import at line 64
no strict 'refs';
# spent 115µs making 1 call to Class::MOP::Module::BEGIN@64 # spent 73µs making 1 call to strict::unimport
65671.47ms scalar %{ $package_name . '::' }; # touch the stash
6667152µs ${ $package_name . '::VERSION' } = $version if defined $version;
6767130µs ${ $package_name . '::AUTHORITY' } = $authority if defined $authority;
68
6967841µs return;
70}
71
72111µs1;
73
74__END__