| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/Scalar/Util.pm |
| Statements | Executed 13 statements in 1.52ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 54µs | 70µs | Scalar::Util::BEGIN@9 |
| 3 | 1 | 1 | 31µs | 31µs | Scalar::Util::reftype (xsub) |
| 0 | 0 | 0 | 0s | 0s | Scalar::Util::export_fail |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # Scalar::Util.pm | ||||
| 2 | # | ||||
| 3 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
| 4 | # This program is free software; you can redistribute it and/or | ||||
| 5 | # modify it under the same terms as Perl itself. | ||||
| 6 | |||||
| 7 | package Scalar::Util; | ||||
| 8 | |||||
| 9 | 2 | 1.04ms | 2 | 86µs | # spent 70µs (54+16) within Scalar::Util::BEGIN@9 which was called:
# once (54µs+16µs) by Data::DPath::Context::BEGIN@17 at line 9 # spent 70µs making 1 call to Scalar::Util::BEGIN@9
# spent 16µs making 1 call to strict::import |
| 10 | 1 | 2µs | require Exporter; | ||
| 11 | 1 | 304µs | require List::Util; # List::Util loads the XS | ||
| 12 | |||||
| 13 | 1 | 23µs | our @ISA = qw(Exporter); | ||
| 14 | 1 | 10µs | our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype); | ||
| 15 | 1 | 2µs | our $VERSION = "1.25"; | ||
| 16 | 1 | 100µs | $VERSION = eval $VERSION; # spent 7µs executing statements in string eval | ||
| 17 | |||||
| 18 | 1 | 1µs | our @EXPORT_FAIL; | ||
| 19 | |||||
| 20 | 1 | 2µs | unless (defined &weaken) { | ||
| 21 | push @EXPORT_FAIL, qw(weaken); | ||||
| 22 | } | ||||
| 23 | 1 | 800ns | unless (defined &isweak) { | ||
| 24 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
| 25 | } | ||||
| 26 | 1 | 800ns | unless (defined &isvstring) { | ||
| 27 | push @EXPORT_FAIL, qw(isvstring); | ||||
| 28 | } | ||||
| 29 | |||||
| 30 | sub export_fail { | ||||
| 31 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
| 32 | require Carp; | ||||
| 33 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | if (grep { /^isvstring$/ } @_ ) { | ||||
| 37 | require Carp; | ||||
| 38 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
| 39 | } | ||||
| 40 | |||||
| 41 | @_; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | 1 | 39µs | 1; | ||
| 45 | |||||
| 46 | __END__ | ||||
# spent 31µs within Scalar::Util::reftype which was called 3 times, avg 10µs/call:
# 3 times (31µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 10µs/call |