Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm |
Statements | Executed 1716 statements in 1.79ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
413 | 5 | 3 | 983µs | 1.10ms | __ANON__[:23] | Class::Data::Inheritable::
12 | 3 | 3 | 146µs | 146µs | mk_classdata | Class::Data::Inheritable::
1 | 1 | 1 | 16µs | 28µs | BEGIN@3 | Class::Data::Inheritable::
1 | 1 | 1 | 11µs | 38µs | BEGIN@4 | Class::Data::Inheritable::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Class::Data::Inheritable; | ||||
2 | |||||
3 | 3 | 20µs | 2 | 41µs | # spent 28µs (16+13) within Class::Data::Inheritable::BEGIN@3 which was called:
# once (16µs+13µs) by base::import at line 3 # spent 28µs making 1 call to Class::Data::Inheritable::BEGIN@3
# spent 13µs making 1 call to strict::import |
4 | 3 | 141µs | 2 | 66µs | # spent 38µs (11+27) within Class::Data::Inheritable::BEGIN@4 which was called:
# once (11µs+27µs) by base::import at line 4 # spent 38µs making 1 call to Class::Data::Inheritable::BEGIN@4
# spent 27µs making 1 call to vars::import |
5 | 1 | 600ns | $VERSION = '0.08'; | ||
6 | |||||
7 | # spent 146µs within Class::Data::Inheritable::mk_classdata which was called 12 times, avg 12µs/call:
# 8 times (100µs+0s) by Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] at line 18, avg 13µs/call
# 3 times (31µs+0s) by DBIx::Class::InflateColumn::Object::Enum::BEGIN@6 at line 15 of Object/Enum.pm, avg 10µs/call
# once (15µs+0s) by base::import at line 84 of SQL/Translator/Schema/Object.pm | ||||
8 | 12 | 14µs | my ($declaredclass, $attribute, $data) = @_; | ||
9 | |||||
10 | 12 | 4µs | if( ref $declaredclass ) { | ||
11 | require Carp; | ||||
12 | Carp::croak("mk_classdata() is a class method, not an object method"); | ||||
13 | } | ||||
14 | |||||
15 | # spent 1.10ms (983µs+120µs) within Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] which was called 413 times, avg 3µs/call:
# 387 times (821µs+0s) by SQL::Translator::Schema::Object::_attributes at line 95 of SQL/Translator/Schema/Object.pm, avg 2µs/call
# 16 times (134µs+120µs) by SQL::Translator::Schema::Object::_attributes at line 94 of SQL/Translator/Schema/Object.pm, avg 16µs/call
# 8 times (20µs+0s) by Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] at line 18, avg 2µs/call
# once (4µs+0s) by base::import at line 87 of SQL/Translator/Schema/Object.pm
# once (4µs+0s) by DBIx::Class::InflateColumn::Object::Enum::BEGIN@6 at line 25 of Object/Enum.pm | ||||
16 | 413 | 201µs | my $wantclass = ref($_[0]) || $_[0]; | ||
17 | |||||
18 | 413 | 193µs | 16 | 120µs | return $wantclass->mk_classdata($attribute)->(@_) # spent 100µs making 8 calls to Class::Data::Inheritable::mk_classdata, avg 13µs/call
# spent 20µs making 8 calls to Class::Data::Inheritable::__ANON__[Class/Data/Inheritable.pm:23], avg 2µs/call |
19 | if @_>1 && $wantclass ne $declaredclass; | ||||
20 | |||||
21 | 405 | 86µs | $data = $_[1] if @_>1; | ||
22 | 405 | 974µs | return $data; | ||
23 | 12 | 33µs | }; | ||
24 | |||||
25 | 12 | 12µs | my $alias = "_${attribute}_accessor"; | ||
26 | 12 | 26µs | *{$declaredclass.'::'.$attribute} = $accessor; | ||
27 | 12 | 83µs | *{$declaredclass.'::'.$alias} = $accessor; | ||
28 | } | ||||
29 | |||||
30 | 1 | 2µs | 1; | ||
31 | |||||
32 | __END__ |