← 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/VSTRING.pm
StatementsExecuted 10 statements in 185µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11110µs10µsData::Printer::Filter::VSTRING::::BEGIN@5Data::Printer::Filter::VSTRING::BEGIN@5
1117µs8µsData::Printer::Filter::VSTRING::::BEGIN@2Data::Printer::Filter::VSTRING::BEGIN@2
1115µs16µsData::Printer::Filter::VSTRING::::BEGIN@3Data::Printer::Filter::VSTRING::BEGIN@3
1113µs13µsData::Printer::Filter::VSTRING::::BEGIN@4Data::Printer::Filter::VSTRING::BEGIN@4
111900ns900nsData::Printer::Filter::VSTRING::::__ANON__Data::Printer::Filter::VSTRING::__ANON__ (xsub)
0000s0sData::Printer::Filter::VSTRING::::__ANON__[:21]Data::Printer::Filter::VSTRING::__ANON__[:21]
0000s0sData::Printer::Filter::VSTRING::::parseData::Printer::Filter::VSTRING::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::VSTRING;
2217µs29µs
# spent 8µs (7+1) within Data::Printer::Filter::VSTRING::BEGIN@2 which was called: # once (7µs+1µs) by Data::Printer::Object::BEGIN@56 at line 2
use strict;
# spent 8µs making 1 call to Data::Printer::Filter::VSTRING::BEGIN@2 # spent 1µs making 1 call to strict::import
3212µs227µs
# spent 16µs (5+11) within Data::Printer::Filter::VSTRING::BEGIN@3 which was called: # once (5µs+11µs) by Data::Printer::Object::BEGIN@56 at line 3
use warnings;
# spent 16µs making 1 call to Data::Printer::Filter::VSTRING::BEGIN@3 # spent 11µs making 1 call to warnings::import
4210µs222µs
# spent 13µs (3+10) within Data::Printer::Filter::VSTRING::BEGIN@4 which was called: # once (3µs+10µs) by Data::Printer::Object::BEGIN@56 at line 4
use Data::Printer::Filter;
# spent 13µs making 1 call to Data::Printer::Filter::VSTRING::BEGIN@4 # spent 10µs making 1 call to Data::Printer::Filter::import
52140µs211µs
# spent 10µs (10+900ns) within Data::Printer::Filter::VSTRING::BEGIN@5 which was called: # once (10µs+900ns) by Data::Printer::Object::BEGIN@56 at line 5
use Data::Printer::Common;
# spent 10µs making 1 call to Data::Printer::Filter::VSTRING::BEGIN@5 # spent 900ns making 1 call to Data::Printer::Filter::VSTRING::__ANON__
6
712µs121µsfilter 'VSTRING' => \&parse;
8
9sub parse {
10 my ($vstring, $ddp) = @_;
11 my $string = '';
12
13 # The reason we don't simply do:
14 # use version 0.77 ();
15 # is because it was causing some issues with UNIVERSAL on Perl 5.8 and
16 # some versions of version.pm. So now we do it on runtime on the filter.
17 # ->parse() will raise an error unless version.pm >= 0.77.
18 my $error = Data::Printer::Common::_tryme(sub {
19 require version;
20 $string = version->parse($$vstring)->normal;
21 });
22 $string = 'VSTRING object (unable to parse)' if $error;
23
24 if ($ddp->show_tied and my $tie = ref tied $$vstring) {
25 $string .= " (tied to $tie)";
26 }
27 return $ddp->maybe_colorize($string, 'vstring');
28};
29
3014µs1;
 
# spent 900ns within Data::Printer::Filter::VSTRING::__ANON__ which was called: # once (900ns+0s) by Data::Printer::Filter::VSTRING::BEGIN@5 at line 5
sub Data::Printer::Filter::VSTRING::__ANON__; # xsub