| Filename | /home/hejohns/perl5/lib/perl5/Data/Printer/Filter/REF.pm |
| Statements | Executed 10 statements in 129µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 8µs | 9µs | Data::Printer::Filter::REF::BEGIN@2 |
| 1 | 1 | 1 | 3µs | 15µs | Data::Printer::Filter::REF::BEGIN@3 |
| 1 | 1 | 1 | 3µs | 14µs | Data::Printer::Filter::REF::BEGIN@4 |
| 1 | 1 | 1 | 2µs | 2µs | Data::Printer::Filter::REF::BEGIN@5 |
| 0 | 0 | 0 | 0s | 0s | Data::Printer::Filter::REF::parse |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Data::Printer::Filter::REF; | ||||
| 2 | 2 | 17µs | 2 | 11µ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 # spent 9µs making 1 call to Data::Printer::Filter::REF::BEGIN@2
# spent 1µs making 1 call to strict::import |
| 3 | 2 | 12µs | 2 | 27µ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 # spent 15µs making 1 call to Data::Printer::Filter::REF::BEGIN@3
# spent 12µs making 1 call to warnings::import |
| 4 | 2 | 12µs | 2 | 25µ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 # spent 14µs making 1 call to Data::Printer::Filter::REF::BEGIN@4
# spent 11µs making 1 call to Data::Printer::Filter::import |
| 5 | 2 | 85µs | 1 | 2µ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 # spent 2µs making 1 call to Data::Printer::Filter::REF::BEGIN@5 |
| 6 | |||||
| 7 | 1 | 1µs | 1 | 14µs | filter 'REF' => \&parse; # spent 14µs making 1 call to Data::Printer::Filter::__ANON__[Data/Printer/Filter.pm:23] |
| 8 | |||||
| 9 | sub 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 | |||||
| 26 | 1 | 2µs | 1; |