← Index
NYTProf Performance Profile   « line view »
For t/bug-md-11.t
  Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:23 2024

Filename/home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/vars.pm
StatementsExecuted 324 statements in 874µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
242416357µs440µsvars::::importvars::import
11114µs14µsvars::::BEGIN@3vars::BEGIN@3
1114µs19µsvars::::BEGIN@7vars::BEGIN@7
1114µs8µ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
3253µs114µs
# spent 14µs within vars::BEGIN@3 which was called: # once (14µs+0s) by Test2::EventFacet::Meta::BEGIN@8 at line 3
use 5.006;
# spent 14µs making 1 call to vars::BEGIN@3
4
51400nsour $VERSION = '1.05';
6
7216µs234µs
# spent 19µs (4+15) within vars::BEGIN@7 which was called: # once (4µs+15µs) by Test2::EventFacet::Meta::BEGIN@8 at line 7
use warnings::register;
# spent 19µs making 1 call to vars::BEGIN@7 # spent 15µs making 1 call to warnings::register::import
82337µs211µs
# spent 8µs (4+4) within vars::BEGIN@8 which was called: # once (4µs+4µs) by Test2::EventFacet::Meta::BEGIN@8 at line 8
use strict qw(vars subs);
# spent 8µs making 1 call to vars::BEGIN@8 # spent 4µs making 1 call to strict::import
9
10
# spent 440µs (357+83) within vars::import which was called 24 times, avg 18µs/call: # once (24µs+5µs) by Digest::Perl::MD5::BEGIN@5 at line 5 of Digest/Perl/MD5.pm # once (22µs+5µs) by File::Path::BEGIN@20 at line 20 of File/Path.pm # once (22µs+5µs) by Digest::SHA::BEGIN@7 at line 7 of Digest/SHA.pm # once (20µs+5µs) by XML::Twig::BEGIN@27 at line 27 of XML/Twig.pm # once (19µs+5µs) by Crypt::RC4::BEGIN@16 at line 16 of Crypt/RC4.pm # once (17µs+4µs) by OLE::Storage_Lite::PPS::BEGIN@13 at line 13 of OLE/Storage_Lite.pm # once (16µs+3µs) by Test2::EventFacet::Meta::BEGIN@8 at line 8 of Test2/EventFacet/Meta.pm # once (14µs+4µs) by Archive::Zip::FileMember::BEGIN@4 at line 4 of Archive/Zip/FileMember.pm # once (14µs+3µs) by OLE::Storage_Lite::BEGIN@834 at line 834 of OLE/Storage_Lite.pm # once (14µs+4µs) by Archive::Zip::Member::BEGIN@6 at line 6 of Archive/Zip/Member.pm # once (14µs+3µs) by Archive::Zip::NewFileMember::BEGIN@4 at line 4 of Archive/Zip/NewFileMember.pm # once (14µs+3µs) by Archive::Zip::StringMember::BEGIN@4 at line 4 of Archive/Zip/StringMember.pm # once (14µs+3µs) by Archive::Zip::ZipFileMember::BEGIN@4 at line 4 of Archive/Zip/ZipFileMember.pm # once (14µs+3µs) by OLE::Storage_Lite::PPS::File::BEGIN@714 at line 714 of OLE/Storage_Lite.pm # once (14µs+3µs) by Spreadsheet::ParseExcel::Utility::BEGIN@23 at line 23 of Spreadsheet/ParseExcel/Utility.pm # once (13µs+3µs) by Archive::Zip::BEGIN@14 at line 14 of Archive/Zip.pm # once (13µs+3µs) by Archive::Zip::DirectoryMember::BEGIN@6 at line 6 of Archive/Zip/DirectoryMember.pm # once (13µs+3µs) by OLE::Storage_Lite::PPS::Dir::BEGIN@802 at line 802 of OLE/Storage_Lite.pm # once (13µs+3µs) by Archive::Zip::Archive::BEGIN@14 at line 14 of Archive/Zip/Archive.pm # once (13µs+3µs) by OLE::Storage_Lite::PPS::Root::BEGIN@172 at line 172 of OLE/Storage_Lite.pm # once (11µs+2µs) by Archive::Zip::BEGIN@35 at line 35 of Archive/Zip.pm # once (10µs+3µs) by XML::Twig::BEGIN@439 at line 439 of XML/Twig.pm # once (11µs+2µs) by Archive::Zip::BEGIN@23 at line 23 of Archive/Zip.pm # once (7µs+2µs) by XML::Twig::BEGIN@38 at line 38 of XML/Twig.pm
sub import {
112410µs my $callpack = caller;
122419µs my (undef, @imports) = @_;
13244µs my ($sym, $ch);
142452µs foreach (@imports) {
1555155µs5558µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 58µs making 55 calls to CORE::match, avg 1µs/call
165551µs5514µs if ($sym =~ /\W/) {
# spent 14µs making 55 calls to CORE::match, avg 251ns/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 }
285563µs5512µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 12µs making 55 calls to CORE::match, avg 209ns/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
3555110µs : 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
4612µs1;
47__END__