| 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 3.03ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 54 | 1 | 1 | 1.43ms | 2.06ms | Variable::Magic::cast (xsub) |
| 54 | 1 | 1 | 413µs | 413µs | Variable::Magic::getdata (xsub) |
| 1 | 1 | 1 | 106µs | 143µs | Variable::Magic::wizard |
| 1 | 1 | 1 | 92µs | 92µs | Variable::Magic::BEGIN@3 |
| 1 | 1 | 1 | 50µs | 845µs | Variable::Magic::BEGIN@204 |
| 1 | 1 | 1 | 48µs | 296µs | Variable::Magic::BEGIN@565 |
| 1 | 1 | 1 | 39µs | 56µs | Variable::Magic::BEGIN@5 |
| 1 | 1 | 1 | 39µs | 203µs | Variable::Magic::BEGIN@8 |
| 1 | 1 | 1 | 37µs | 37µs | Variable::Magic::_wizard (xsub) |
| 1 | 1 | 1 | 36µs | 103µs | Variable::Magic::BEGIN@6 |
| 1 | 1 | 1 | 19µs | 19µs | Variable::Magic::BEGIN@21 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Variable::Magic; | ||||
| 2 | |||||
| 3 | 3 | 151µs | 1 | 92µs | # spent 92µs within Variable::Magic::BEGIN@3 which was called:
# once (92µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 3 # spent 92µs making 1 call to Variable::Magic::BEGIN@3 |
| 4 | |||||
| 5 | 3 | 92µs | 2 | 72µs | # spent 56µs (39+17) within Variable::Magic::BEGIN@5 which was called:
# once (39µs+17µs) by B::Hooks::EndOfScope::BEGIN@14 at line 5 # spent 56µs making 1 call to Variable::Magic::BEGIN@5
# spent 17µs making 1 call to strict::import |
| 6 | 3 | 116µs | 2 | 170µs | # spent 103µs (36+67) within Variable::Magic::BEGIN@6 which was called:
# once (36µs+67µs) by B::Hooks::EndOfScope::BEGIN@14 at line 6 # spent 103µs making 1 call to Variable::Magic::BEGIN@6
# spent 67µs making 1 call to warnings::import |
| 7 | |||||
| 8 | 3 | 165µs | 2 | 368µs | # spent 203µs (39+165) within Variable::Magic::BEGIN@8 which was called:
# once (39µs+165µs) by B::Hooks::EndOfScope::BEGIN@14 at line 8 # spent 203µs making 1 call to Variable::Magic::BEGIN@8
# spent 165µs making 1 call to Exporter::import |
| 9 | |||||
| 10 | =head1 NAME | ||||
| 11 | |||||
| - - | |||||
| 20 | 1 | 2µs | our $VERSION; | ||
| 21 | # spent 19µs within Variable::Magic::BEGIN@21 which was called:
# once (19µs+0s) by B::Hooks::EndOfScope::BEGIN@14 at line 23 | ||||
| 22 | 1 | 18µs | $VERSION = '0.43'; | ||
| 23 | 1 | 218µs | 1 | 19µs | } # spent 19µs making 1 call to Variable::Magic::BEGIN@21 |
| 24 | |||||
| 25 | =head1 SYNOPSIS | ||||
| 26 | |||||
| - - | |||||
| 204 | # spent 845µs (50+795) within Variable::Magic::BEGIN@204 which was called:
# once (50µs+795µs) by B::Hooks::EndOfScope::BEGIN@14 at line 207 | ||||
| 205 | 2 | 844µs | require XSLoader; | ||
| 206 | 1 | 795µs | XSLoader::load(__PACKAGE__, $VERSION); # spent 795µs making 1 call to XSLoader::load | ||
| 207 | 1 | 781µs | 1 | 845µs | } # spent 845µs making 1 call to Variable::Magic::BEGIN@204 |
| 208 | |||||
| 209 | =head2 C<wizard> | ||||
| 210 | |||||
| - - | |||||
| 298 | # spent 143µs (106+37) within Variable::Magic::wizard which was called:
# once (106µs+37µs) by namespace::clean::BEGIN@17 at line 26 of B/Hooks/EndOfScope.pm | ||||
| 299 | 10 | 71µ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 | 78µs | 1 | 37µs | my $ret = eval { _wizard(map $opts{$_}, @keys) }; # spent 37µ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 | 392µs | 2 | 543µs | # spent 296µs (48+248) within Variable::Magic::BEGIN@565 which was called:
# once (48µs+248µs) by B::Hooks::EndOfScope::BEGIN@14 at line 565 # spent 296µs making 1 call to Variable::Magic::BEGIN@565
# spent 248µs making 1 call to base::import |
| 566 | |||||
| 567 | 1 | 3µs | our @EXPORT = (); | ||
| 568 | 1 | 20µ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 | 14µs | $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; | ||
| 584 | |||||
| 585 | =head1 CAVEATS | ||||
| 586 | |||||
| - - | |||||
| 639 | 1 | 24µs | 1; # End of Variable::Magic | ||
# spent 37µs within Variable::Magic::_wizard which was called:
# once (37µs+0s) by Variable::Magic::wizard at line 306 | |||||
# spent 2.06ms (1.43+631µs) within Variable::Magic::cast which was called 54 times, avg 38µs/call:
# 54 times (1.43ms+631µs) by B::Hooks::EndOfScope::on_scope_end at line 37 of B/Hooks/EndOfScope.pm, avg 38µs/call | |||||
# spent 413µs within Variable::Magic::getdata which was called 54 times, avg 8µs/call:
# 54 times (413µs+0s) by B::Hooks::EndOfScope::on_scope_end at line 33 of B/Hooks/EndOfScope.pm, avg 8µs/call |