| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Variable/Magic.pm |
| Statements | Executed 35 statements in 2.98ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 46 | 1 | 1 | 1.33ms | 1.84ms | Variable::Magic::cast (xsub) |
| 46 | 1 | 1 | 323µs | 323µs | Variable::Magic::getdata (xsub) |
| 1 | 1 | 1 | 109µs | 149µs | Variable::Magic::wizard |
| 1 | 1 | 1 | 95µs | 95µs | Variable::Magic::BEGIN@3 |
| 1 | 1 | 1 | 47µs | 319µs | Variable::Magic::BEGIN@565 |
| 1 | 1 | 1 | 46µs | 802µs | Variable::Magic::BEGIN@204 |
| 1 | 1 | 1 | 40µs | 40µs | Variable::Magic::_wizard (xsub) |
| 1 | 1 | 1 | 39µs | 308µs | Variable::Magic::BEGIN@8 |
| 1 | 1 | 1 | 38µs | 56µs | Variable::Magic::BEGIN@5 |
| 1 | 1 | 1 | 37µs | 105µs | Variable::Magic::BEGIN@6 |
| 1 | 1 | 1 | 20µs | 20µs | Variable::Magic::BEGIN@21 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Variable::Magic; | ||||
| 2 | |||||
| 3 | 3 | 143µs | 1 | 95µs | # spent 95µs within Variable::Magic::BEGIN@3 which was called:
# once (95µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 3 # spent 95µs making 1 call to Variable::Magic::BEGIN@3 |
| 4 | |||||
| 5 | 3 | 92µs | 2 | 73µs | # spent 56µs (38+18) within Variable::Magic::BEGIN@5 which was called:
# once (38µs+18µs) by B::Hooks::EndOfScope::BEGIN@14 at line 5 # spent 56µs making 1 call to Variable::Magic::BEGIN@5
# spent 18µs making 1 call to strict::import |
| 6 | 3 | 104µs | 2 | 173µs | # spent 105µs (37+68) within Variable::Magic::BEGIN@6 which was called:
# once (37µs+68µs) by B::Hooks::EndOfScope::BEGIN@14 at line 6 # spent 105µs making 1 call to Variable::Magic::BEGIN@6
# spent 68µs making 1 call to warnings::import |
| 7 | |||||
| 8 | 3 | 173µs | 2 | 576µs | # spent 308µs (39+268) within Variable::Magic::BEGIN@8 which was called:
# once (39µs+268µs) by B::Hooks::EndOfScope::BEGIN@14 at line 8 # spent 308µs making 1 call to Variable::Magic::BEGIN@8
# spent 268µs making 1 call to Exporter::import |
| 9 | |||||
| 10 | =head1 NAME | ||||
| 11 | |||||
| - - | |||||
| 20 | 1 | 2µs | our $VERSION; | ||
| 21 | # spent 20µs within Variable::Magic::BEGIN@21 which was called:
# once (20µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 23 | ||||
| 22 | 1 | 18µs | $VERSION = '0.43'; | ||
| 23 | 1 | 231µs | 1 | 20µs | } # spent 20µs making 1 call to Variable::Magic::BEGIN@21 |
| 24 | |||||
| 25 | =head1 SYNOPSIS | ||||
| 26 | |||||
| - - | |||||
| 204 | # spent 802µs (46+756) within Variable::Magic::BEGIN@204 which was called:
# once (46µs+756µs) by B::Hooks::EndOfScope::BEGIN@14 at line 207 | ||||
| 205 | 2 | 801µs | require XSLoader; | ||
| 206 | 1 | 756µs | XSLoader::load(__PACKAGE__, $VERSION); # spent 756µs making 1 call to XSLoader::load | ||
| 207 | 1 | 726µs | 1 | 802µs | } # spent 802µs making 1 call to Variable::Magic::BEGIN@204 |
| 208 | |||||
| 209 | =head2 C<wizard> | ||||
| 210 | |||||
| - - | |||||
| 298 | # spent 149µs (109+40) within Variable::Magic::wizard which was called:
# once (109µs+40µs) by namespace::clean::BEGIN@17 at line 26 of B/Hooks/EndOfScope.pm | ||||
| 299 | 11 | 156µs | croak 'Wrong number of arguments for wizard()' if @_ % 2; | ||
| 300 | my %opts = @_; | ||||
| 301 | my @keys = qw/data op_info get set len clear free/; | ||||
| 302 | push @keys, 'copy' if MGf_COPY; | ||||
| 303 | push @keys, 'dup' if MGf_DUP; | ||||
| 304 | push @keys, 'local' if MGf_LOCAL; | ||||
| 305 | push @keys, qw/fetch store exists delete copy_key/ if VMG_UVAR; | ||||
| 306 | 1 | 40µs | my $ret = eval { _wizard(map $opts{$_}, @keys) }; # spent 40µs making 1 call to Variable::Magic::_wizard | ||
| 307 | if (my $err = $@) { | ||||
| 308 | $err =~ s/\sat\s+.*?\n//; | ||||
| 309 | croak $err; | ||||
| 310 | } | ||||
| 311 | return $ret; | ||||
| 312 | } | ||||
| 313 | |||||
| 314 | =head2 C<cast> | ||||
| 315 | |||||
| - - | |||||
| 565 | 3 | 424µs | 2 | 590µs | # spent 319µs (47+271) within Variable::Magic::BEGIN@565 which was called:
# once (47µs+271µs) by B::Hooks::EndOfScope::BEGIN@14 at line 565 # spent 319µs making 1 call to Variable::Magic::BEGIN@565
# spent 271µs making 1 call to base::import |
| 566 | |||||
| 567 | 1 | 3µs | our @EXPORT = (); | ||
| 568 | 1 | 21µs | our %EXPORT_TAGS = ( | ||
| 569 | 'funcs' => [ qw/wizard cast getdata dispell/ ], | ||||
| 570 | 'consts' => [ qw/ | ||||
| 571 | MGf_COPY MGf_DUP MGf_LOCAL VMG_UVAR | ||||
| 572 | VMG_COMPAT_ARRAY_PUSH_NOLEN VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID | ||||
| 573 | VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID | ||||
| 574 | VMG_COMPAT_ARRAY_UNDEF_CLEAR | ||||
| 575 | VMG_COMPAT_SCALAR_LENGTH_NOLEN | ||||
| 576 | VMG_COMPAT_GLOB_GET | ||||
| 577 | VMG_PERL_PATCHLEVEL | ||||
| 578 | VMG_THREADSAFE VMG_FORKSAFE | ||||
| 579 | VMG_OP_INFO_NAME VMG_OP_INFO_OBJECT | ||||
| 580 | / ], | ||||
| 581 | ); | ||||
| 582 | 1 | 45µs | our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; | ||
| 583 | 1 | 13µs | $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; | ||
| 584 | |||||
| 585 | =head1 CAVEATS | ||||
| 586 | |||||
| - - | |||||
| 639 | 1 | 24µs | 1; # End of Variable::Magic | ||
# spent 40µs within Variable::Magic::_wizard which was called:
# once (40µs+0s) by Variable::Magic::wizard at line 306 | |||||
# spent 1.84ms (1.33+510µs) within Variable::Magic::cast which was called 46 times, avg 40µs/call:
# 46 times (1.33ms+510µs) by B::Hooks::EndOfScope::on_scope_end at line 37 of B/Hooks/EndOfScope.pm, avg 40µs/call | |||||
# spent 323µs within Variable::Magic::getdata which was called 46 times, avg 7µs/call:
# 46 times (323µs+0s) by B::Hooks::EndOfScope::on_scope_end at line 33 of B/Hooks/EndOfScope.pm, avg 7µs/call |