← Index
NYTProf Performance Profile   « line view »
For t/optimization.t
  Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:06 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Class/Data/Inheritable.pm
StatementsExecuted 52 statements in 320µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
55180µs80µsClass::Data::Inheritable::::mk_classdataClass::Data::Inheritable::mk_classdata
11114µs27µsClass::Data::Inheritable::::BEGIN@3Class::Data::Inheritable::BEGIN@3
44112µs12µsClass::Data::Inheritable::::__ANON__[:23]Class::Data::Inheritable::__ANON__[:23]
1118µs31µ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
3227µs240µs
# spent 27µs (14+13) within Class::Data::Inheritable::BEGIN@3 which was called: # once (14µs+13µs) by Exception::Class::Base::BEGIN@9 at line 3
use strict qw(vars subs);
# spent 27µs making 1 call to Class::Data::Inheritable::BEGIN@3 # spent 13µs making 1 call to strict::import
42170µs254µs
# spent 31µs (8+23) within Class::Data::Inheritable::BEGIN@4 which was called: # once (8µs+23µs) by Exception::Class::Base::BEGIN@9 at line 4
use vars qw($VERSION);
# spent 31µs making 1 call to Class::Data::Inheritable::BEGIN@4 # spent 23µs making 1 call to vars::import
51900ns$VERSION = '0.08';
6
7
# spent 80µs within Class::Data::Inheritable::mk_classdata which was called 5 times, avg 16µs/call: # once (39µs+0s) by Exception::Class::Base::BEGIN@15 at line 17 of Exception/Class/Base.pm # once (12µs+0s) by Exception::Class::Base::BEGIN@15 at line 16 of Exception/Class/Base.pm # once (10µs+0s) by Exception::Class::Base::BEGIN@15 at line 20 of Exception/Class/Base.pm # once (10µs+0s) by Exception::Class::Base::BEGIN@15 at line 23 of Exception/Class/Base.pm # once (9µs+0s) by Exception::Class::Base::BEGIN@15 at line 26 of Exception/Class/Base.pm
sub mk_classdata {
854µs my ($declaredclass, $attribute, $data) = @_;
9
1051µs if( ref $declaredclass ) {
11 require Carp;
12 Carp::croak("mk_classdata() is a class method, not an object method");
13 }
14
15
# spent 12µs within Class::Data::Inheritable::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Class/Data/Inheritable.pm:23] which was called 4 times, avg 3µs/call: # once (5µs+0s) by Exception::Class::Base::BEGIN@15 at line 18 of Exception/Class/Base.pm # once (3µs+0s) by Exception::Class::Base::BEGIN@15 at line 27 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 21 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 24 of Exception/Class/Base.pm
my $accessor = sub {
1642µs my $wantclass = ref($_[0]) || $_[0];
17
1842µs return $wantclass->mk_classdata($attribute)->(@_)
19 if @_>1 && $wantclass ne $declaredclass;
20
2141µs $data = $_[1] if @_>1;
22417µs return $data;
23511µs };
24
2554µs my $alias = "_${attribute}_accessor";
26536µs *{$declaredclass.'::'.$attribute} = $accessor;
27541µs *{$declaredclass.'::'.$alias} = $accessor;
28}
29
3013µs1;
31
32__END__