← Index
NYTProf Performance Profile   « line view »
For split.pl
  Run on Thu Apr 20 02:05:47 2023
Reported on Thu Apr 20 18:31:10 2023

Filename/home/hejohns/perl5/lib/perl5/Data/Printer/Filter/REF.pm
StatementsExecuted 10 statements in 129µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1118µs9µsData::Printer::Filter::REF::::BEGIN@2Data::Printer::Filter::REF::BEGIN@2
1113µs15µsData::Printer::Filter::REF::::BEGIN@3Data::Printer::Filter::REF::BEGIN@3
1113µs14µsData::Printer::Filter::REF::::BEGIN@4Data::Printer::Filter::REF::BEGIN@4
1112µs2µsData::Printer::Filter::REF::::BEGIN@5Data::Printer::Filter::REF::BEGIN@5
0000s0sData::Printer::Filter::REF::::parseData::Printer::Filter::REF::parse
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Data::Printer::Filter::REF;
2217µs211µs
# spent 9µs (8+1) within Data::Printer::Filter::REF::BEGIN@2 which was called: # once (8µs+1µs) by Data::Printer::Object::BEGIN@55 at line 2
use strict;
# spent 9µs making 1 call to Data::Printer::Filter::REF::BEGIN@2 # spent 1µs making 1 call to strict::import
3212µs227µs
# spent 15µs (3+12) within Data::Printer::Filter::REF::BEGIN@3 which was called: # once (3µs+12µs) by Data::Printer::Object::BEGIN@55 at line 3
use warnings;
# spent 15µs making 1 call to Data::Printer::Filter::REF::BEGIN@3 # spent 12µs making 1 call to warnings::import
4212µs225µs
# spent 14µs (3+11) within Data::Printer::Filter::REF::BEGIN@4 which was called: # once (3µs+11µs) by Data::Printer::Object::BEGIN@55 at line 4
use Data::Printer::Filter;
# spent 14µs making 1 call to Data::Printer::Filter::REF::BEGIN@4 # spent 11µs making 1 call to Data::Printer::Filter::import
5285µs12µs
# spent 2µs within Data::Printer::Filter::REF::BEGIN@5 which was called: # once (2µs+0s) by Data::Printer::Object::BEGIN@55 at line 5
use Scalar::Util ();
# spent 2µs making 1 call to Data::Printer::Filter::REF::BEGIN@5
6
711µs114µsfilter 'REF' => \&parse;
8
9sub parse {
10 my ($ref, $ddp) = @_;
11
12 my $string = '';
13 # we only add the '\' if it's not an object
14 if (!Scalar::Util::blessed($$ref) && (ref $$ref eq 'REF' || ref $$ref eq 'SCALAR' || ref $$ref eq 'VSTRING')) {
15 $string .= '\\ ';
16 }
17 $string .= $ddp->parse($$ref);
18
19 if ($ddp->show_tied and my $tie = ref tied $ref) {
20 $string .= " (tied to $tie)";
21 }
22
23 return $string;
24};
25
2612µs1;