← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:03 2021

Filename/usr/local/lib/perl5/5.32/Pod/Simple/LinkSection.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sPod::Simple::LinkSection::::BEGIN@11Pod::Simple::LinkSection::BEGIN@11
0000s0sPod::Simple::LinkSection::::BEGIN@6Pod::Simple::LinkSection::BEGIN@6
0000s0sPod::Simple::LinkSection::::BEGIN@7Pod::Simple::LinkSection::BEGIN@7
0000s0sPod::Simple::LinkSection::::BEGIN@8Pod::Simple::LinkSection::BEGIN@8
0000s0sPod::Simple::LinkSection::::__ANON__Pod::Simple::LinkSection::__ANON__ (xsub)
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
2require 5;
3package Pod::Simple::LinkSection;
4 # Based somewhat dimly on Array::Autojoin
5
6use strict;
7use Pod::Simple::BlackBox;
8use vars qw($VERSION );
9$VERSION = '3.40';
10
11use overload( # So it'll stringify nice
12 '""' => \&Pod::Simple::BlackBox::stringify_lol,
13 'bool' => \&Pod::Simple::BlackBox::stringify_lol,
14 # '.=' => \&tack_on, # grudgingly support
15
16 'fallback' => 1, # turn on cleverness
17);
18
19sub tack_on {
20 $_[0] = ['', {}, "$_[0]" ];
21 return $_[0][2] .= $_[1];
22}
23
24sub as_string {
25 goto &Pod::Simple::BlackBox::stringify_lol;
26}
27sub stringify {
28 goto &Pod::Simple::BlackBox::stringify_lol;
29}
30
31sub new {
32 my $class = shift;
33 $class = ref($class) || $class;
34 my $new;
35 if(@_ == 1) {
36 if (!ref($_[0] || '')) { # most common case: one bare string
37 return bless ['', {}, $_[0] ], $class;
38 } elsif( ref($_[0] || '') eq 'ARRAY') {
39 $new = [ @{ $_[0] } ];
40 } else {
41 Carp::croak( "$class new() doesn't know to clone $new" );
42 }
43 } else { # misc stuff
44 $new = [ '', {}, @_ ];
45 }
46
47 # By now it's a treelet: [ 'foo', {}, ... ]
48 foreach my $x (@$new) {
49 if(ref($x || '') eq 'ARRAY') {
50 $x = $class->new($x); # recurse
51 } elsif(ref($x || '') eq 'HASH') {
52 $x = { %$x };
53 }
54 # otherwise leave it.
55 }
56
57 return bless $new, $class;
58}
59
60# Not much in this class is likely to be link-section specific --
61# but it just so happens that link-sections are about the only treelets
62# that are exposed to the user.
63
641;
65
66__END__