← 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/Regexp.pm
StatementsExecuted 10 statements in 186µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1117µs8µsData::Printer::Filter::Regexp::::BEGIN@2Data::Printer::Filter::Regexp::BEGIN@2
1115µs6µsData::Printer::Filter::Regexp::::BEGIN@5Data::Printer::Filter::Regexp::BEGIN@5
1113µs14µsData::Printer::Filter::Regexp::::BEGIN@3Data::Printer::Filter::Regexp::BEGIN@3
1113µs15µsData::Printer::Filter::Regexp::::BEGIN@4Data::Printer::Filter::Regexp::BEGIN@4
111300ns300nsData::Printer::Filter::Regexp::::__ANON__Data::Printer::Filter::Regexp::__ANON__ (xsub)
0000s0sData::Printer::Filter::Regexp::::__ANON__[:30]Data::Printer::Filter::Regexp::__ANON__[:30]
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::Regexp;
2215µs29µs
# spent 8µs (7+1) within Data::Printer::Filter::Regexp::BEGIN@2 which was called: # once (7µs+1µs) by Data::Printer::Object::BEGIN@59 at line 2
use strict;
# spent 8µs making 1 call to Data::Printer::Filter::Regexp::BEGIN@2 # spent 1µs making 1 call to strict::import
3211µs225µs
# spent 14µs (3+11) within Data::Printer::Filter::Regexp::BEGIN@3 which was called: # once (3µs+11µs) by Data::Printer::Object::BEGIN@59 at line 3
use warnings;
# spent 14µs making 1 call to Data::Printer::Filter::Regexp::BEGIN@3 # spent 11µs making 1 call to warnings::import
4211µs228µs
# spent 15µs (3+13) within Data::Printer::Filter::Regexp::BEGIN@4 which was called: # once (3µs+13µs) by Data::Printer::Object::BEGIN@59 at line 4
use Data::Printer::Filter;
# spent 15µs making 1 call to Data::Printer::Filter::Regexp::BEGIN@4 # spent 13µs making 1 call to Data::Printer::Filter::import
52144µs26µs
# spent 6µs (5+300ns) within Data::Printer::Filter::Regexp::BEGIN@5 which was called: # once (5µs+300ns) by Data::Printer::Object::BEGIN@59 at line 5
use Data::Printer::Common;
# spent 6µs making 1 call to Data::Printer::Filter::Regexp::BEGIN@5 # spent 300ns making 1 call to Data::Printer::Filter::Regexp::__ANON__
6
7filter 'Regexp' => sub {
8 my ($regexp, $ddp) = @_;
9 my $val = "$regexp";
10 my $string;
11
12 # a regex to parse a regex. Talk about full circle :)
13 # note: we are not validating anything, just grabbing modifiers
14 if ($val =~ m/\(\?\^?([uladxismnpogce]*)(?:\-[uladxismnpogce]+)?:(.*)\)/s) {
15 my ($modifiers, $parsed_val) = ($1, $2);
16 $string = $ddp->maybe_colorize($parsed_val, 'regex');
17 if ($modifiers) {
18 $string .= " (modifiers: $modifiers)";
19 }
20 }
21 else {
22 Data::Printer::Common::_warn($ddp, "Unrecognized regex $val. Please submit a bug report for Data::Printer.");
23 $string = $ddp->maybe_colorize('Unknown Regexp', 'regex');
24 }
25
26 if ($ddp->show_tied and my $tie = ref tied $regexp) {
27 $string .= " (tied to $tie)";
28 }
29 return $string;
3013µs112µs};
31
3212µs1;
 
# spent 300ns within Data::Printer::Filter::Regexp::__ANON__ which was called: # once (300ns+0s) by Data::Printer::Filter::Regexp::BEGIN@5 at line 5
sub Data::Printer::Filter::Regexp::__ANON__; # xsub