| Filename | /usr/share/perl/5.10/Tie/Hash/NamedCapture.pm |
| Statements | Executed 11 statements in 68µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 16µs | 16µs | Tie::Hash::NamedCapture::TIEHASH |
| 1 | 1 | 1 | 12µs | 12µs | Tie::Hash::NamedCapture::flags (xsub) |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Tie::Hash::NamedCapture; | ||||
| 2 | |||||
| 3 | 1 | 900ns | our $VERSION = "0.06"; | ||
| 4 | |||||
| 5 | # The real meat implemented in XS in universal.c in the core, but this | ||||
| 6 | # method was left behind because gv.c expects a Purl-Perl method in | ||||
| 7 | # this package when it loads the tie magic for %+ and %- | ||||
| 8 | |||||
| 9 | 1 | 28µs | 1 | 12µs | my ($one, $all) = Tie::Hash::NamedCapture::flags(); # spent 12µs making 1 call to Tie::Hash::NamedCapture::flags |
| 10 | |||||
| 11 | sub TIEHASH { | ||||
| 12 | 2 | 3µs | my ($pkg, %arg) = @_; | ||
| 13 | 2 | 2µs | my $flag = $arg{all} ? $all : $one; | ||
| 14 | 2 | 16µs | bless \$flag => $pkg; | ||
| 15 | } | ||||
| 16 | |||||
| 17 | 1 | 7µs | 1 | 11µs | tie %+, __PACKAGE__; # spent 11µs making 1 call to Tie::Hash::NamedCapture::TIEHASH |
| 18 | 1 | 3µs | 1 | 5µs | tie %-, __PACKAGE__, all => 1; # spent 5µs making 1 call to Tie::Hash::NamedCapture::TIEHASH |
| 19 | |||||
| 20 | 1 | 8µs | 1; | ||
| 21 | |||||
| 22 | __END__ | ||||
# spent 12µs within Tie::Hash::NamedCapture::flags which was called:
# once (12µs+0s) by Date::Manip::Date::BEGIN@407 at line 9 |