← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:23:23 2010

File /usr/local/lib/perl5/site_perl/5.10.1/LWP/MemberMixin.pm
Statements Executed 411
Statement Execution Time 361µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
8221313µs313µsLWP::MemberMixin::::_elemLWP::MemberMixin::_elem
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package LWP::MemberMixin;
2
3sub _elem
4
# spent 313µs within LWP::MemberMixin::_elem which was called 82 times, avg 4µs/call: # 41 times (226µs+0s) by LWP::UserAgent::protocols_allowed at line 524 of LWP/UserAgent.pm, avg 6µs/call # 41 times (87µs+0s) by LWP::UserAgent::protocols_forbidden at line 525 of LWP/UserAgent.pm, avg 2µs/call
{
58239µs my $self = shift;
68229µs my $elem = shift;
78254µs my $old = $self->{$elem};
88222µs $self->{$elem} = shift if @_;
982215µs return $old;
10}
11
1212µs1;
13
14__END__
15
16=head1 NAME
17
18LWP::MemberMixin - Member access mixin class
19
20=head1 SYNOPSIS
21
22 package Foo;
23 require LWP::MemberMixin;
24 @ISA=qw(LWP::MemberMixin);
25
26=head1 DESCRIPTION
27
28A mixin class to get methods that provide easy access to member
29variables in the %$self.
30Ideally there should be better Perl language support for this.
31
32There is only one method provided:
33
34=over 4
35
36=item _elem($elem [, $val])
37
38Internal method to get/set the value of member variable
39C<$elem>. If C<$val> is present it is used as the new value
40for the member variable. If it is not present the current
41value is not touched. In both cases the previous value of
42the member variable is returned.
43
44=back