← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:11 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Class/Data/Inheritable.pm
StatementsExecuted 6836 statements in 9.39ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1700612.92ms2.92msClass::Data::Inheritable::::__ANON__[:23]Class::Data::Inheritable::__ANON__[:23]
55144µs44µsClass::Data::Inheritable::::mk_classdataClass::Data::Inheritable::mk_classdata
11113µs25µsClass::Data::Inheritable::::BEGIN@3Class::Data::Inheritable::BEGIN@3
1117µs27µsClass::Data::Inheritable::::BEGIN@4Class::Data::Inheritable::BEGIN@4
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Class::Data::Inheritable;
2
3224µs237µs
# spent 25µs (13+12) within Class::Data::Inheritable::BEGIN@3 which was called: # once (13µs+12µs) by Exception::Class::Base::BEGIN@6 at line 3
use strict qw(vars subs);
# spent 25µs making 1 call to Class::Data::Inheritable::BEGIN@3 # spent 12µs making 1 call to strict::import
42164µs248µs
# spent 27µs (7+20) within Class::Data::Inheritable::BEGIN@4 which was called: # once (7µs+20µs) by Exception::Class::Base::BEGIN@6 at line 4
use vars qw($VERSION);
# spent 27µs making 1 call to Class::Data::Inheritable::BEGIN@4 # spent 20µs making 1 call to vars::import
51700ns$VERSION = '0.08';
6
7
# spent 44µs within Class::Data::Inheritable::mk_classdata which was called 5 times, avg 9µs/call: # once (11µs+0s) by Exception::Class::Base::BEGIN@12 at line 20 of Exception/Class/Base.pm # once (11µs+0s) by Exception::Class::Base::BEGIN@12 at line 13 of Exception/Class/Base.pm # once (8µs+0s) by Exception::Class::Base::BEGIN@12 at line 14 of Exception/Class/Base.pm # once (8µs+0s) by Exception::Class::Base::BEGIN@12 at line 23 of Exception/Class/Base.pm # once (7µs+0s) by Exception::Class::Base::BEGIN@12 at line 17 of Exception/Class/Base.pm
sub mk_classdata {
853µs my ($declaredclass, $attribute, $data) = @_;
9
105600ns if( ref $declaredclass ) {
11 require Carp;
12 Carp::croak("mk_classdata() is a class method, not an object method");
13 }
14
15
# spent 2.92ms within Class::Data::Inheritable::__ANON__[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Class/Data/Inheritable.pm:23] which was called 1700 times, avg 2µs/call: # 1272 times (2.06ms+0s) by Exception::Class::Base::_initialize at line 126 of Exception/Class/Base.pm, avg 2µs/call # 424 times (852µs+0s) by Exception::Class::Base::_initialize at line 101 of Exception/Class/Base.pm, avg 2µs/call # once (3µs+0s) by Exception::Class::Base::BEGIN@12 at line 15 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@12 at line 21 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@12 at line 24 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@12 at line 18 of Exception/Class/Base.pm
my $accessor = sub {
161700519µs my $wantclass = ref($_[0]) || $_[0];
17
181700216µs return $wantclass->mk_classdata($attribute)->(@_)
19 if @_>1 && $wantclass ne $declaredclass;
20
21170071µs $data = $_[1] if @_>1;
2217008.34ms return $data;
2358µs };
24
2553µs my $alias = "_${attribute}_accessor";
26510µs *{$declaredclass.'::'.$attribute} = $accessor;
27530µs *{$declaredclass.'::'.$alias} = $accessor;
28}
29
3012µs1;
31
32__END__