← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:35 2015

Filename/Users/ap13/perl5/lib/perl5/darwin-2level/Class/MOP/Module.pm
StatementsExecuted 38 statements in 730µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21169µs475µsClass::MOP::Module::::createClass::MOP::Module::create
11119µs40µsClass::MOP::Module::::BEGIN@4Class::MOP::Module::BEGIN@4
21117µs19µsClass::MOP::Module::::_instantiate_moduleClass::MOP::Module::_instantiate_module
11116µs4.10msClass::MOP::Module::::BEGIN@7Class::MOP::Module::BEGIN@7
11112µs18µsClass::MOP::Module::::BEGIN@5Class::MOP::Module::BEGIN@5
0000s0sClass::MOP::Module::::_anon_cache_keyClass::MOP::Module::_anon_cache_key
0000s0sClass::MOP::Module::::_anon_package_prefixClass::MOP::Module::_anon_package_prefix
0000s0sClass::MOP::Module::::_newClass::MOP::Module::_new
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
1package Class::MOP::Module;
211µsour $VERSION = '2.1403';
3
4249µs260µs
# spent 40µs (19+20) within Class::MOP::Module::BEGIN@4 which was called: # once (19µs+20µs) by parent::import at line 4
use strict;
# spent 40µs making 1 call to Class::MOP::Module::BEGIN@4 # spent 20µs making 1 call to strict::import
5238µs224µs
# spent 18µs (12+6) within Class::MOP::Module::BEGIN@5 which was called: # once (12µs+6µs) by parent::import at line 5
use warnings;
# spent 18µs making 1 call to Class::MOP::Module::BEGIN@5 # spent 6µs making 1 call to warnings::import
6
72550µs24.10ms
# spent 4.10ms (16µs+4.08) within Class::MOP::Module::BEGIN@7 which was called: # once (16µs+4.08ms) by parent::import at line 7
use parent 'Class::MOP::Package';
# spent 4.10ms making 1 call to Class::MOP::Module::BEGIN@7 # spent 4.08ms making 1 call to parent::import, recursion: max depth 1, sum of overlapping time 4.08ms
8
9sub _new {
10 my $class = shift;
11 return Class::MOP::Class->initialize($class)->new_object(@_)
12 if $class ne __PACKAGE__;
13
14 my $params = @_ == 1 ? $_[0] : {@_};
15 return bless {
16 # Need to quote package to avoid a problem with PPI mis-parsing this
17 # as a package statement.
18
19 # from Class::MOP::Package
20 'package' => $params->{package},
21 namespace => \undef,
22
23 # attributes
24 version => \undef,
25 authority => \undef
26 } => $class;
27}
28
29sub version {
30 my $self = shift;
31 ${$self->get_or_add_package_symbol('$VERSION')};
32}
33
34sub authority {
35 my $self = shift;
36 ${$self->get_or_add_package_symbol('$AUTHORITY')};
37}
38
39sub identifier {
40 my $self = shift;
41 join '-' => (
42 $self->name,
43 ($self->version || ()),
44 ($self->authority || ()),
45 );
46}
47
48
# spent 475µs (69+406) within Class::MOP::Module::create which was called 2 times, avg 238µs/call: # 2 times (69µs+406µs) by Class::MOP::Class::create at line 444 of Class/MOP/Class.pm, avg 238µs/call
sub create {
492064µs my $class = shift;
50 my @args = @_;
51
52 unshift @args, 'package' if @args % 2 == 1;
53 my %options = @args;
54
55 my $package = delete $options{package};
56 my $version = delete $options{version};
57 my $authority = delete $options{authority};
58
592388µs my $meta = $class->SUPER::create($package => %options);
# spent 388µs making 2 calls to Class::MOP::Package::create, avg 194µs/call
60
61219µs $meta->_instantiate_module($version, $authority);
# spent 19µs making 2 calls to Class::MOP::Module::_instantiate_module, avg 9µs/call
62
63 return $meta;
64}
65
66sub _anon_package_prefix { 'Class::MOP::Module::__ANON__::SERIAL::' }
67
68sub _anon_cache_key {
69 my $class = shift;
70 my %options = @_;
71 $class->_throw_exception( PackagesAndModulesAreNotCachable => class_name => $class,
72 params => \%options,
73 is_module => 1
74 );
75}
76
77
# spent 19µs (17+2) within Class::MOP::Module::_instantiate_module which was called 2 times, avg 9µs/call: # 2 times (17µs+2µs) by Class::MOP::Module::create at line 61, avg 9µs/call
sub _instantiate_module {
781021µs my($self, $version, $authority) = @_;
7922µs my $package_name = $self->name;
# spent 2µs making 2 calls to Class::MOP::Package::name, avg 800ns/call
80
81 $self->add_package_symbol('$VERSION' => $version)
82 if defined $version;
83 $self->add_package_symbol('$AUTHORITY' => $authority)
84 if defined $authority;
85
86 return;
87}
88
8916µs1;
90
91# ABSTRACT: Module Meta Object
92
93__END__