| File | /usr/share/perl/5.8/vars.pm | Statements Executed | 1987 | Total Time | 0.0103920000000001 seconds |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine | |
|---|---|---|---|---|---|---|
| 27 | 27 | 7 | 0.00854 | 0.00854 | vars:: | import |
| 0 | 0 | 0 | 0 | 0 | vars:: | BEGIN |
| Line | Stmts. | Exclusive Time | Avg. | Code |
|---|---|---|---|---|
| 1 | package vars; | |||
| 2 | ||||
| 3 | 3 | 6.0e-5 | 2.0e-5 | use 5.006; |
| 4 | ||||
| 5 | 1 | 1.0e-6 | 1.0e-6 | our $VERSION = '1.01'; |
| 6 | ||||
| 7 | 3 | 0.00161 | 0.00054 | use warnings::register; # spent 247µs making 1 call to warnings::register::import |
| 8 | 3 | 0.00044 | 0.00015 | use strict qw(vars subs); # spent 43µs making 1 call to strict::import |
| 9 | ||||
| 10 | # spent 8.54ms within vars::import which was called 27 times, avg 316µs/call:
# once (1.47ms+0) at line 313 of awstats.pl
# once (1.25ms+0) at line 45 of awstats.pl
# once (755µs+0) at line 227 of awstats.pl
# once (612µs+0) at line 134 of awstats.pl
# once (487µs+0) at line 159 of awstats.pl
# once (485µs+0) at line 291 of awstats.pl
# once (459µs+0) at line 213 of awstats.pl
# once (425µs+0) at line 190 of awstats.pl
# once (343µs+0) at line 201 of awstats.pl
# once (340µs+0) at line 282 of awstats.pl
# once (295µs+0) at line 87 of awstats.pl
# once (261µs+0) at line 101 of awstats.pl
# once (260µs+0) at line 28 of awstats.pl
# once (153µs+0) at line 181 of awstats.pl
# once (114µs+0) at line 23 of awstats.pl
# once (111µs+0) at line 5 of /usr/local/lib/perl/5.8.8/Geo/IP.pm
# once (105µs+0) at line 9 of /usr/share/perl/5.8/Time/Local.pm
# once (80µs+0) at line 334 of awstats.pl
# once (78µs+0) at line 82 of awstats.pl
# once (77µs+0) at line 17 of /usr/lib/perl/5.8/DynaLoader.pm
# once (72µs+0) at line 347 of awstats.pl
# once (66µs+0) at line 16 of plugins/geoip.pm
# once (64µs+0) by main::BEGIN at line 45 of plugins/geoip.pm
# once (55µs+0) at line 5 of /usr/local/lib/perl/5.8.8/Geo/IP/Record.pm
# once (54µs+0) by base::BEGIN at line 4 of /usr/share/perl/5.8/base.pm
# once (34µs+0) at line 350 of awstats.pl
# once (33µs+0) at line 96 of awstats.pl | |||
| 11 | 1976 | 0.00828 | 4.2e-6 | my $callpack = caller; |
| 12 | my ($pack, @imports) = @_; | |||
| 13 | my ($sym, $ch); | |||
| 14 | foreach (@imports) { | |||
| 15 | if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) { | |||
| 16 | if ($sym =~ /\W/) { | |||
| 17 | # time for a more-detailed check-up | |||
| 18 | if ($sym =~ /^\w+[[{].*[]}]$/) { | |||
| 19 | require Carp; | |||
| 20 | Carp::croak("Can't declare individual elements of hash or array"); | |||
| 21 | } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) { | |||
| 22 | warnings::warn("No need to declare built-in vars"); | |||
| 23 | } elsif (($^H &= strict::bits('vars'))) { | |||
| 24 | require Carp; | |||
| 25 | Carp::croak("'$_' is not a valid variable name under strict vars"); | |||
| 26 | } | |||
| 27 | } | |||
| 28 | $sym = "${callpack}::$sym" unless $sym =~ /::/; | |||
| 29 | *$sym = | |||
| 30 | ( $ch eq "\$" ? \$$sym | |||
| 31 | : $ch eq "\@" ? \@$sym | |||
| 32 | : $ch eq "\%" ? \%$sym | |||
| 33 | : $ch eq "\*" ? \*$sym | |||
| 34 | : $ch eq "\&" ? \&$sym | |||
| 35 | : do { | |||
| 36 | require Carp; | |||
| 37 | Carp::croak("'$_' is not a valid variable name"); | |||
| 38 | }); | |||
| 39 | } else { | |||
| 40 | require Carp; | |||
| 41 | Carp::croak("'$_' is not a valid variable name"); | |||
| 42 | } | |||
| 43 | } | |||
| 44 | }; | |||
| 45 | ||||
| 46 | 1 | 6.0e-6 | 6.0e-6 | 1; |
| 47 | __END__ | |||
| 48 |