← Index
NYTProf Performance Profile   « block view • line view • sub view »
For conv.pl
  Run on Sun Nov 14 22:06:10 2010
Reported on Sun Nov 14 22:07:07 2010

Filename/usr/share/perl/5.10/vars.pm
StatementsExecuted 175 statements in 1.83ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
151511761µs932µsvars::::importvars::import
111350µs522µsvars::::BEGIN@7vars::BEGIN@7
7831171µs171µsvars::::CORE:matchvars::CORE:match (opcode)
11175µs75µsvars::::BEGIN@3vars::BEGIN@3
11112µs40µsvars::::BEGIN@8vars::BEGIN@8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package vars;
2
33111µs175µs
# spent 75µs within vars::BEGIN@3 which was called: # once (75µs+0s) by MARC::File::XML::BEGIN@5 at line 3
use 5.006;
# spent 75µs making 1 call to vars::BEGIN@3
4
512µsour $VERSION = '1.01';
6
73372µs2694µs
# spent 522µs (350+172) within vars::BEGIN@7 which was called: # once (350µs+172µs) by MARC::File::XML::BEGIN@5 at line 7
use warnings::register;
# spent 522µs making 1 call to vars::BEGIN@7 # spent 172µs making 1 call to warnings::register::import
83382µs268µs
# spent 40µs (12+28) within vars::BEGIN@8 which was called: # once (12µs+28µs) by MARC::File::XML::BEGIN@5 at line 8
use strict qw(vars subs);
# spent 40µs making 1 call to vars::BEGIN@8 # spent 28µs making 1 call to strict::import
9
10
# spent 932µs (761+171) within vars::import which was called 15 times, avg 62µs/call: # once (124µs+29µs) by POSIX::SigRt::BEGIN@66 at line 66 of POSIX.pm # once (75µs+18µs) by MARC::Record::BEGIN@27 at line 27 of MARC/Record.pm # once (72µs+20µs) by Storable::BEGIN@24 at line 24 of Storable.pm # once (67µs+15µs) by MARC::File::XML::BEGIN@5 at line 5 of lib/MARC/File/XML.pm # once (62µs+16µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (52µs+13µs) by constant::BEGIN@6 at line 6 of constant.pm # once (42µs+7µs) by MARC::Record::BEGIN@12 at line 12 of MARC/Record.pm # once (39µs+7µs) by MARC::File::USMARC::BEGIN@16 at line 16 of MARC/File/USMARC.pm # once (36µs+8µs) by MARC::File::USMARC::BEGIN@12 at line 12 of MARC/File/USMARC.pm # once (35µs+7µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (34µs+7µs) by MARC::File::BEGIN@12 at line 12 of MARC/File.pm # once (33µs+5µs) by MARC::Record::BEGIN@32 at line 32 of MARC/Record.pm # once (30µs+7µs) by MARC::Record::BEGIN@23 at line 23 of MARC/Record.pm # once (31µs+6µs) by MARC::Field::BEGIN@10 at line 10 of MARC/Field.pm # once (29µs+6µs) by base::BEGIN@4 at line 4 of base.pm
sub import {
1160190µs my $callpack = caller;
12 my ($pack, @imports) = @_;
13 my ($sym, $ch);
14 foreach (@imports) {
15104774µs2694µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 94µs making 26 calls to vars::CORE:match, avg 4µs/call
162642µs if ($sym =~ /\W/) {
# spent 42µs making 26 calls to vars::CORE:match, avg 2µs/call
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 }
282635µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 35µs making 26 calls to vars::CORE:match, avg 1µs/call
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
4614µs1;
47__END__
 
# spent 171µs within vars::CORE:match which was called 78 times, avg 2µs/call: # 26 times (94µs+0s) by vars::import at line 15, avg 4µs/call # 26 times (42µs+0s) by vars::import at line 16, avg 2µs/call # 26 times (35µs+0s) by vars::import at line 28, avg 1µs/call
sub vars::CORE:match; # opcode