| Filename | /usr/share/perl/5.36/Pod/Simple/TiedOutFH.pm | 
| Statements | Executed 10 statements in 238µs | 
| Calls | P | F | Exclusive Time | Inclusive Time | Subroutine | 
|---|---|---|---|---|---|
| 1 | 1 | 1 | 7µs | 9µs | Pod::Simple::BEGIN@2 | 
| 1 | 1 | 1 | 7µs | 18µs | Pod::Simple::TiedOutFH::BEGIN@6 | 
| 1 | 1 | 1 | 5µs | 22µs | Pod::Simple::TiedOutFH::BEGIN@4 | 
| 1 | 1 | 1 | 2µs | 2µs | Pod::Simple::TiedOutFH::BEGIN@5 | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::CLOSE | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::FETCH | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::FILENO | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::PRINT | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::PRINTF | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::TIEHANDLE | 
| 0 | 0 | 0 | 0s | 0s | Pod::Simple::TiedOutFH::handle_on | 
| Line | State ments | Time on line | Calls | Time in subs | Code | 
|---|---|---|---|---|---|
| 1 | |||||
| 2 | 2 | 24µs | 2 | 11µs | # spent 9µs (7+2) within Pod::Simple::BEGIN@2 which was called:
#    once (7µs+2µs) by Pod::Simple::BEGIN@11 at line 2 # spent     9µs making 1 call to Pod::Simple::BEGIN@2
# spent     2µs making 1 call to strict::import | 
| 3 | package Pod::Simple::TiedOutFH; | ||||
| 4 | 2 | 15µs | 2 | 39µs | # spent 22µs (5+17) within Pod::Simple::TiedOutFH::BEGIN@4 which was called:
#    once (5µs+17µs) by Pod::Simple::BEGIN@11 at line 4 # spent    22µs making 1 call to Pod::Simple::TiedOutFH::BEGIN@4
# spent    17µs making 1 call to Exporter::import | 
| 5 | 2 | 10µs | 1 | 2µs | # spent 2µs within Pod::Simple::TiedOutFH::BEGIN@5 which was called:
#    once (2µs+0s) by Pod::Simple::BEGIN@11 at line 5 # spent     2µs making 1 call to Pod::Simple::TiedOutFH::BEGIN@5 | 
| 6 | 2 | 187µs | 2 | 28µs | # spent 18µs (7+11) within Pod::Simple::TiedOutFH::BEGIN@6 which was called:
#    once (7µs+11µs) by Pod::Simple::BEGIN@11 at line 6 # spent    18µs making 1 call to Pod::Simple::TiedOutFH::BEGIN@6
# spent    11µs making 1 call to vars::import | 
| 7 | 1 | 300ns | $VERSION = '3.43'; | ||
| 8 | |||||
| 9 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
| 10 | |||||
| 11 | sub handle_on { # some horrible frightening things are encapsulated in here | ||||
| 12 | my $class = shift; | ||||
| 13 | $class = ref($class) || $class; | ||||
| 14 | |||||
| 15 | Carp::croak "Usage: ${class}->handle_on(\$somescalar)" unless @_; | ||||
| 16 | |||||
| 17 | my $x = (defined($_[0]) and ref($_[0])) | ||||
| 18 | ? $_[0] | ||||
| 19 | : ( \( $_[0] ) )[0] | ||||
| 20 | ; | ||||
| 21 | $$x = '' unless defined $$x; | ||||
| 22 | |||||
| 23 | #Pod::Simple::DEBUG and print STDERR "New $class handle on $x = \"$$x\"\n"; | ||||
| 24 | |||||
| 25 | my $new = gensym(); | ||||
| 26 | tie *$new, $class, $x; | ||||
| 27 | return $new; | ||||
| 28 | } | ||||
| 29 | |||||
| 30 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
| 31 | |||||
| 32 | sub TIEHANDLE { # Ties to just a scalar ref | ||||
| 33 | my($class, $scalar_ref) = @_; | ||||
| 34 | $$scalar_ref = '' unless defined $$scalar_ref; | ||||
| 35 | return bless \$scalar_ref, ref($class) || $class; | ||||
| 36 | } | ||||
| 37 | |||||
| 38 | sub PRINT { | ||||
| 39 | my $it = shift; | ||||
| 40 | foreach my $x (@_) { $$$it .= $x } | ||||
| 41 | |||||
| 42 | #Pod::Simple::DEBUG > 10 and print STDERR " appended to $$it = \"$$$it\"\n"; | ||||
| 43 | |||||
| 44 | return 1; | ||||
| 45 | } | ||||
| 46 | |||||
| 47 | sub FETCH { | ||||
| 48 | return ${$_[0]}; | ||||
| 49 | } | ||||
| 50 | |||||
| 51 | sub PRINTF { | ||||
| 52 | my $it = shift; | ||||
| 53 | my $format = shift; | ||||
| 54 | $$$it .= sprintf $format, @_; | ||||
| 55 | return 1; | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | sub FILENO { ${ $_[0] } + 100 } # just to produce SOME number | ||||
| 59 | |||||
| 60 | sub CLOSE { 1 } | ||||
| 61 | |||||
| 62 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
| 63 | 1 | 2µs | 1; | ||
| 64 | __END__ |