Filename | /usr/share/perl5/vars.pm |
Statements | Executed 1132 statements in 3.80ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
51 | 51 | 43 | 2.49ms | 2.49ms | import | vars::
1 | 1 | 1 | 383µs | 532µs | BEGIN@7 | vars::
1 | 1 | 1 | 40µs | 40µs | BEGIN@3 | vars::
1 | 1 | 1 | 15µs | 36µs | BEGIN@8 | vars::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package vars; | ||||
2 | |||||
3 | 2 | 122µs | 1 | 40µs | # spent 40µs within vars::BEGIN@3 which was called:
# once (40µs+0s) by File::Spec::BEGIN@4 at line 3 # spent 40µs making 1 call to vars::BEGIN@3 |
4 | |||||
5 | 1 | 1µs | our $VERSION = '1.02'; | ||
6 | |||||
7 | 2 | 421µs | 2 | 681µs | # spent 532µs (383+149) within vars::BEGIN@7 which was called:
# once (383µs+149µs) by File::Spec::BEGIN@4 at line 7 # spent 532µs making 1 call to vars::BEGIN@7
# spent 149µs making 1 call to warnings::register::import |
8 | 2 | 521µs | 2 | 57µs | # spent 36µs (15+21) within vars::BEGIN@8 which was called:
# once (15µs+21µs) by File::Spec::BEGIN@4 at line 8 # spent 36µs making 1 call to vars::BEGIN@8
# spent 21µs making 1 call to strict::import |
9 | |||||
10 | # spent 2.49ms within vars::import which was called 51 times, avg 49µs/call:
# once (196µs+0s) by Foswiki::Plugins::ChecklistPlugin::BEGIN@23 at line 23 of /var/www/foswiki11/lib/Foswiki/Plugins/ChecklistPlugin.pm
# once (139µs+0s) by Locale::Maketext::BEGIN@4 at line 4 of Locale/Maketext.pm
# once (132µs+0s) by Foswiki::Plugins::ChartPlugin::BEGIN@42 at line 42 of /var/www/foswiki11/lib/Foswiki/Plugins/ChartPlugin.pm
# once (113µs+0s) by I18N::LangTags::Detect::BEGIN@8 at line 8 of I18N/LangTags/Detect.pm
# once (111µs+0s) by I18N::LangTags::BEGIN@8 at line 8 of I18N/LangTags.pm
# once (99µs+0s) by Foswiki::Plugins::FindElsewherePlugin::Core::BEGIN@33 at line 33 of /var/www/foswiki11/lib/Foswiki/Plugins/FindElsewherePlugin/Core.pm
# once (70µs+0s) by HTML::Entities::BEGIN@139 at line 139 of HTML/Entities.pm
# once (70µs+0s) by Foswiki::Plugins::SpreadSheetPlugin::BEGIN@11 at line 11 of /var/www/foswiki11/lib/Foswiki/Plugins/SpreadSheetPlugin.pm
# once (70µs+0s) by version::BEGIN@7 at line 7 of version.pm
# once (59µs+0s) by Foswiki::Plugins::RevCommentPlugin::BEGIN@25 at line 25 of /var/www/foswiki11/lib/Foswiki/Plugins/RevCommentPlugin.pm
# once (56µs+0s) by Cwd::BEGIN@172 at line 172 of Cwd.pm
# once (56µs+0s) by Foswiki::Plugins::TwistyPlugin::BEGIN@17 at line 17 of /var/www/foswiki11/lib/Foswiki/Plugins/TwistyPlugin.pm
# once (52µs+0s) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm
# once (48µs+0s) by Error::subs::BEGIN@299 at line 299 of Error.pm
# once (47µs+0s) by HTML::Entities::BEGIN@140 at line 140 of HTML/Entities.pm
# once (47µs+0s) by Foswiki::Plugins::SlideShowPlugin::BEGIN@8 at line 8 of /var/www/foswiki11/lib/Foswiki/Plugins/SlideShowPlugin.pm
# once (46µs+0s) by Foswiki::Plugins::AutoViewTemplatePlugin::BEGIN@16 at line 16 of /var/www/foswiki11/lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm
# once (46µs+0s) by Foswiki::Plugins::RenderListPlugin::BEGIN@28 at line 28 of /var/www/foswiki11/lib/Foswiki/Plugins/RenderListPlugin.pm
# once (46µs+0s) by Foswiki::Plugins::ExtendedWebListPlugin::BEGIN@36 at line 36 of /var/www/foswiki11/lib/Foswiki/Plugins/ExtendedWebListPlugin.pm
# once (45µs+0s) by Foswiki::BEGIN@18 at line 18 of setlib.cfg
# once (43µs+0s) by version::vxs::BEGIN@7 at line 7 of version/vxs.pm
# once (42µs+0s) by version::regex::BEGIN@5 at line 5 of version/regex.pm
# once (41µs+0s) by Digest::MD5::BEGIN@4 at line 4 of Digest/MD5.pm
# once (41µs+0s) by Foswiki::Plugins::SmiliesPlugin::BEGIN@12 at line 12 of /var/www/foswiki11/lib/Foswiki/Plugins/SmiliesPlugin.pm
# once (40µs+0s) by File::Path::BEGIN@19 at line 19 of File/Path.pm
# once (39µs+0s) by Foswiki::Plugins::RevisionLinkPlugin::BEGIN@37 at line 37 of /var/www/foswiki11/lib/Foswiki/Plugins/RevisionLinkPlugin.pm
# once (36µs+0s) by Foswiki::Plugins::RevCommentPlugin::BEGIN@30 at line 30 of /var/www/foswiki11/lib/Foswiki/Plugins/RevCommentPlugin.pm
# once (36µs+0s) by File::Temp::BEGIN@36 at line 36 of File/Temp.pm
# once (36µs+0s) by Foswiki::BEGIN@5 at line 5 of LocalLib.cfg
# once (36µs+0s) by Time::Local::BEGIN@8 at line 8 of Time/Local.pm
# once (35µs+0s) by HTML::Parser::BEGIN@10 at line 10 of HTML/Parser.pm
# once (35µs+0s) by constant::BEGIN@6 at line 6 of constant.pm
# once (34µs+0s) by MIME::Base64::BEGIN@4 at line 4 of MIME/Base64.pm
# once (33µs+0s) by Time::Timezone::BEGIN@110 at line 109 of Time/Timezone.pm
# once (33µs+0s) by Foswiki::Plugins::FindElsewherePlugin::BEGIN@25 at line 25 of /var/www/foswiki11/lib/Foswiki/Plugins/FindElsewherePlugin.pm
# once (33µs+0s) by Error::Simple::BEGIN@260 at line 260 of Error.pm
# once (32µs+0s) by Time::JulianDay::BEGIN@20 at line 20 of Time/JulianDay.pm
# once (32µs+0s) by Time::ParseDate::BEGIN@17 at line 17 of Time/ParseDate.pm
# once (32µs+0s) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@278 at line 278 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin/Handlers.pm
# once (30µs+0s) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm
# once (29µs+0s) by Storable::BEGIN@23 at line 23 of Storable.pm
# once (26µs+0s) by Error::BEGIN@15 at line 15 of Error.pm
# once (25µs+0s) by Config::BEGIN@11 at line 11 of Config.pm
# once (24µs+0s) by base::BEGIN@4 at line 4 of base.pm
# once (22µs+0s) by Digest::base::BEGIN@4 at line 4 of Digest/base.pm
# once (19µs+0s) by Foswiki::Users::BEGIN@313 at line 313 of /var/www/foswiki11/lib/Foswiki/Users.pm
# once (19µs+0s) by Foswiki::Plugins::PreferencesPlugin::BEGIN@16 at line 16 of /var/www/foswiki11/lib/Foswiki/Plugins/PreferencesPlugin.pm
# once (18µs+0s) by Time::Timezone::BEGIN@15 at line 15 of Time/Timezone.pm
# once (15µs+0s) by Time::Timezone::BEGIN@23 at line 23 of Time/Timezone.pm
# once (13µs+0s) by Time::ParseDate::BEGIN@22 at line 22 of Time/ParseDate.pm
# once (12µs+0s) by Time::ParseDate::BEGIN@25 at line 25 of Time/ParseDate.pm | ||||
11 | 51 | 171µs | my $callpack = caller; | ||
12 | 51 | 127µs | my (undef, @imports) = @_; | ||
13 | 51 | 20µs | my ($sym, $ch); | ||
14 | 51 | 420µs | foreach (@imports) { | ||
15 | 230 | 821µs | if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) { | ||
16 | 230 | 106µs | 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 | 230 | 228µs | $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 | 230 | 834µ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 | |||||
46 | 1 | 5µs | 1; | ||
47 | __END__ |