← Index
Performance Profile   « block view • line view • sub view »
For /wise/base/deliv/dev/bin/getfix
  Run on Thu May 20 15:30:03 2010
Reported on Thu May 20 16:25:35 2010

File/wise/base/static/lib/perl5/site_perl/5.10.0/DBIx/Class/Relationship/ProxyMethods.pm
Statements Executed22
Total Time0.00037 seconds

Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
00000DBIx::Class::Relationship::ProxyMethods::BEGIN
00000DBIx::Class::Relationship::ProxyMethods::__ANON__[:32]
00000DBIx::Class::Relationship::ProxyMethods::proxy_to_related
00000DBIx::Class::Relationship::ProxyMethods::register_relationship

LineStmts.Exclusive
Time
Avg.Code
1package # hide from PAUSE
2 DBIx::Class::Relationship::ProxyMethods;
3
433.3e-51.1e-5use strict;
# spent 11µs making 1 call to strict::import
533.1e-51.0e-5use warnings;
# spent 21µs making 1 call to warnings::import
6
730.000113.6e-5use base qw/DBIx::Class/;
# spent 97µs making 1 call to base::import
8
9sub register_relationship {
1062.7e-54.5e-6 my ($class, $rel, $info) = @_;
11 if (my $proxy_list = $info->{attrs}{proxy}) {
12 $class->proxy_to_related($rel,
13 (ref $proxy_list ? @$proxy_list : $proxy_list));
14 }
15 $class->next::method($rel, $info);
# spent 44µs making 2 calls to next::method, avg 22µs/call
16}
17
18sub proxy_to_related {
19 my ($class, $rel, @proxy) = @_;
2032.9e-59.7e-6 no strict 'refs';
# spent 19µs making 1 call to strict::unimport
2130.000144.7e-5 no warnings 'redefine';
# spent 29µs making 1 call to warnings::unimport
22 foreach my $proxy (@proxy) {
23 *{"${class}::${proxy}"} =
24 sub {
25 my $self = shift;
26 my $val = $self->$rel;
27 if (@_ && !defined $val) {
28 $val = $self->create_related($rel, { $proxy => $_[0] });
29 @_ = ();
30 }
31 return ($val ? $val->$proxy(@_) : undef);
32 }
33 }
34}
35
3612.0e-62.0e-61;