← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Tue Nov 7 05:38:10 2017
Reported on Tue Nov 7 06:16:00 2017

Filename/usr/local/lib/perl5/5.24/Pod/Simple/LinkSection.pm
StatementsExecuted 14 statements in 1.25ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11122.7ms23.0msPod::Simple::LinkSection::::BEGIN@9Pod::Simple::LinkSection::BEGIN@9
11147µs116µsPod::Simple::LinkSection::::BEGIN@5Pod::Simple::LinkSection::BEGIN@5
11130µs201µsPod::Simple::LinkSection::::BEGIN@13Pod::Simple::LinkSection::BEGIN@13
11126µs112µsPod::Simple::LinkSection::::BEGIN@10Pod::Simple::LinkSection::BEGIN@10
11123µs37µsPod::Simple::LinkSection::::BEGIN@8Pod::Simple::LinkSection::BEGIN@8
0000s0sPod::Simple::LinkSection::::as_stringPod::Simple::LinkSection::as_string
0000s0sPod::Simple::LinkSection::::newPod::Simple::LinkSection::new
0000s0sPod::Simple::LinkSection::::stringifyPod::Simple::LinkSection::stringify
0000s0sPod::Simple::LinkSection::::tack_onPod::Simple::LinkSection::tack_on
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2120µsrequire 5;
3package Pod::Simple::LinkSection;
4 # Based somewhat dimly on Array::Autojoin
5295µs2184µs
# spent 116µs (47+69) within Pod::Simple::LinkSection::BEGIN@5 which was called: # once (47µs+69µs) by Pod::Simple::BEGIN@9 at line 5
use vars qw($VERSION );
# spent 116µs making 1 call to Pod::Simple::LinkSection::BEGIN@5 # spent 69µs making 1 call to vars::import
612µs$VERSION = '3.32';
7
8281µs251µs
# spent 37µs (23+14) within Pod::Simple::LinkSection::BEGIN@8 which was called: # once (23µs+14µs) by Pod::Simple::BEGIN@9 at line 8
use strict;
# spent 37µs making 1 call to Pod::Simple::LinkSection::BEGIN@8 # spent 14µs making 1 call to strict::import
92356µs123.0ms
# spent 23.0ms (22.7+266µs) within Pod::Simple::LinkSection::BEGIN@9 which was called: # once (22.7ms+266µs) by Pod::Simple::BEGIN@9 at line 9
use Pod::Simple::BlackBox;
# spent 23.0ms making 1 call to Pod::Simple::LinkSection::BEGIN@9
102124µs2198µs
# spent 112µs (26+86) within Pod::Simple::LinkSection::BEGIN@10 which was called: # once (26µs+86µs) by Pod::Simple::BEGIN@9 at line 10
use vars qw($VERSION );
# spent 112µs making 1 call to Pod::Simple::LinkSection::BEGIN@10 # spent 86µs making 1 call to vars::import
1112µs$VERSION = '3.32';
12
13
# spent 201µs (30+171) within Pod::Simple::LinkSection::BEGIN@13 which was called: # once (30µs+171µs) by Pod::Simple::BEGIN@9 at line 19
use overload( # So it'll stringify nice
1412µs '""' => \&Pod::Simple::BlackBox::stringify_lol,
15 'bool' => \&Pod::Simple::BlackBox::stringify_lol,
16 # '.=' => \&tack_on, # grudgingly support
17
18 'fallback' => 1, # turn on cleverness
191553µs2373µs);
# spent 201µs making 1 call to Pod::Simple::LinkSection::BEGIN@13 # spent 171µs making 1 call to overload::import
20
21sub tack_on {
22 $_[0] = ['', {}, "$_[0]" ];
23 return $_[0][2] .= $_[1];
24}
25
26sub as_string {
27 goto &Pod::Simple::BlackBox::stringify_lol;
28}
29sub stringify {
30 goto &Pod::Simple::BlackBox::stringify_lol;
31}
32
33sub new {
34 my $class = shift;
35 $class = ref($class) || $class;
36 my $new;
37 if(@_ == 1) {
38 if (!ref($_[0] || '')) { # most common case: one bare string
39 return bless ['', {}, $_[0] ], $class;
40 } elsif( ref($_[0] || '') eq 'ARRAY') {
41 $new = [ @{ $_[0] } ];
42 } else {
43 Carp::croak( "$class new() doesn't know to clone $new" );
44 }
45 } else { # misc stuff
46 $new = [ '', {}, @_ ];
47 }
48
49 # By now it's a treelet: [ 'foo', {}, ... ]
50 foreach my $x (@$new) {
51 if(ref($x || '') eq 'ARRAY') {
52 $x = $class->new($x); # recurse
53 } elsif(ref($x || '') eq 'HASH') {
54 $x = { %$x };
55 }
56 # otherwise leave it.
57 }
58
59 return bless $new, $class;
60}
61
62# Not much in this class is likely to be link-section specific --
63# but it just so happens that link-sections are about the only treelets
64# that are exposed to the user.
65
66112µs1;
67
68__END__