← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 01.HTTP.t
  Run on Tue May 4 15:25:55 2010
Reported on Tue May 4 15:26:06 2010

File /usr/local/lib/perl5/site_perl/5.10.1/LWP/MemberMixin.pm
Statements Executed 31
Statement Execution Time 31µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
62122µs22µ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 22µs within LWP::MemberMixin::_elem which was called 6 times, avg 4µs/call: # 3 times (14µs+0s) by LWP::UserAgent::protocols_allowed at line 524 of LWP/UserAgent.pm, avg 5µs/call # 3 times (7µs+0s) by LWP::UserAgent::protocols_forbidden at line 525 of LWP/UserAgent.pm, avg 2µs/call
{
53029µs my $self = shift;
6 my $elem = shift;
7 my $old = $self->{$elem};
8 $self->{$elem} = shift if @_;
9 return $old;
10}
11
1213µ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