Filename | /usr/share/perl5/vars.pm |
Statements | Executed 1096 statements in 3.36ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
51 | 51 | 41 | 2.03ms | 2.03ms | import | vars::
1 | 1 | 1 | 386µs | 551µs | BEGIN@7 | vars::
1 | 1 | 1 | 50µs | 50µs | BEGIN@3 | vars::
1 | 1 | 1 | 16µs | 40µs | BEGIN@8 | vars::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package vars; | ||||
2 | |||||
3 | 2 | 140µs | 1 | 50µs | # spent 50µs within vars::BEGIN@3 which was called:
# once (50µs+0s) by File::Spec::BEGIN@4 at line 3 # spent 50µs making 1 call to vars::BEGIN@3 |
4 | |||||
5 | 1 | 1µs | our $VERSION = '1.02'; | ||
6 | |||||
7 | 2 | 428µs | 2 | 716µs | # spent 551µs (386+165) within vars::BEGIN@7 which was called:
# once (386µs+165µs) by File::Spec::BEGIN@4 at line 7 # spent 551µs making 1 call to vars::BEGIN@7
# spent 165µs making 1 call to warnings::register::import |
8 | 2 | 551µs | 2 | 65µs | # spent 40µs (16+25) within vars::BEGIN@8 which was called:
# once (16µs+25µs) by File::Spec::BEGIN@4 at line 8 # spent 40µs making 1 call to vars::BEGIN@8
# spent 24µs making 1 call to strict::import |
9 | |||||
10 | # spent 2.03ms within vars::import which was called 51 times, avg 40µs/call:
# once (162µs+0s) by Foswiki::Plugins::ChecklistPlugin::BEGIN@24 at line 24 of /var/www/foswikidev/core/lib/Foswiki/Plugins/ChecklistPlugin.pm
# once (131µs+0s) by Foswiki::Plugins::ChartPlugin::BEGIN@42 at line 42 of /var/www/foswikidev/core/lib/Foswiki/Plugins/ChartPlugin.pm
# once (74µs+0s) by Foswiki::Plugins::RenderFormPlugin::Core::BEGIN@28 at line 28 of /var/www/foswikidev/core/lib/Foswiki/Plugins/RenderFormPlugin/Core.pm
# once (64µs+0s) by version::BEGIN@7 at line 7 of version.pm
# once (59µs+0s) by Foswiki::Plugins::RevCommentPlugin::BEGIN@28 at line 28 of /var/www/foswikidev/core/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/foswikidev/core/lib/Foswiki/Plugins/TwistyPlugin.pm
# once (55µs+0s) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm
# once (52µs+0s) by Locale::Maketext::BEGIN@4 at line 4 of Locale/Maketext.pm
# once (51µs+0s) by Foswiki::Plugins::SpreadSheetPlugin::BEGIN@11 at line 11 of /var/www/foswikidev/core/lib/Foswiki/Plugins/SpreadSheetPlugin.pm
# once (48µs+0s) by Error::subs::BEGIN@299 at line 299 of Error.pm
# once (46µs+0s) by Foswiki::Plugins::ExtendedWebListPlugin::BEGIN@37 at line 37 of /var/www/foswikidev/core/lib/Foswiki/Plugins/ExtendedWebListPlugin.pm
# once (46µs+0s) by I18N::LangTags::Detect::BEGIN@8 at line 8 of I18N/LangTags/Detect.pm
# once (45µs+0s) by Foswiki::Plugins::RenderListPlugin::BEGIN@11 at line 11 of /var/www/foswikidev/core/lib/Foswiki/Plugins/RenderListPlugin.pm
# once (45µs+0s) by Foswiki::BEGIN@18 at line 18 of setlib.cfg
# once (43µs+0s) by Foswiki::Plugins::AutoViewTemplatePlugin::BEGIN@6 at line 6 of /var/www/foswikidev/core/lib/Foswiki/Plugins/AutoViewTemplatePlugin.pm
# once (43µs+0s) by I18N::LangTags::BEGIN@8 at line 8 of I18N/LangTags.pm
# once (42µs+0s) by Digest::MD5::BEGIN@4 at line 4 of Digest/MD5.pm
# once (40µs+0s) by Foswiki::Plugins::RenderFormPlugin::BEGIN@23 at line 23 of /var/www/foswikidev/core/lib/Foswiki/Plugins/RenderFormPlugin.pm
# once (40µs+0s) by constant::BEGIN@6 at line 6 of constant.pm
# once (39µs+0s) by Foswiki::Plugins::RevisionLinkPlugin::BEGIN@37 at line 37 of /var/www/foswikidev/core/lib/Foswiki/Plugins/RevisionLinkPlugin.pm
# once (36µs+0s) by Time::Local::BEGIN@8 at line 8 of Time/Local.pm
# once (36µs+0s) by Foswiki::Plugins::RevCommentPlugin::BEGIN@33 at line 33 of /var/www/foswikidev/core/lib/Foswiki/Plugins/RevCommentPlugin.pm
# once (35µs+0s) by HTML::Entities::BEGIN@139 at line 139 of HTML/Entities.pm
# once (34µs+0s) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm
# once (34µs+0s) by File::Path::BEGIN@19 at line 19 of File/Path.pm
# once (34µs+0s) by File::Temp::BEGIN@36 at line 36 of File/Temp.pm
# once (34µs+0s) by version::regex::BEGIN@5 at line 5 of version/regex.pm
# once (34µs+0s) by MIME::Base64::BEGIN@4 at line 4 of MIME/Base64.pm
# once (33µs+0s) by Time::JulianDay::BEGIN@20 at line 20 of Time/JulianDay.pm
# once (32µs+0s) by URI::BEGIN@13 at line 13 of URI.pm
# once (32µs+0s) by Time::Timezone::BEGIN@110 at line 109 of Time/Timezone.pm
# once (31µs+0s) by Time::ParseDate::BEGIN@17 at line 17 of Time/ParseDate.pm
# once (31µs+0s) by version::vxs::BEGIN@7 at line 7 of version/vxs.pm
# once (29µs+0s) by Error::Simple::BEGIN@260 at line 260 of Error.pm
# once (28µs+0s) by Storable::BEGIN@23 at line 23 of Storable.pm
# once (26µs+0s) by Foswiki::Plugins::WysiwygPlugin::Handlers::BEGIN@286 at line 286 of /var/www/foswikidev/core/lib/Foswiki/Plugins/WysiwygPlugin/Handlers.pm
# once (25µs+0s) by Error::BEGIN@15 at line 15 of Error.pm
# once (25µs+0s) by URI::BEGIN@7 at line 7 of URI.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 (22µs+0s) by HTML::Entities::BEGIN@140 at line 140 of HTML/Entities.pm
# once (22µs+0s) by HTML::Parser::BEGIN@10 at line 10 of HTML/Parser.pm
# once (22µs+0s) by Foswiki::Users::BEGIN@313 at line 313 of /var/www/foswikidev/core/lib/Foswiki/Users.pm
# once (21µs+0s) by URI::BEGIN@4 at line 4 of URI.pm
# once (18µs+0s) by Foswiki::Plugins::PreferencesPlugin::BEGIN@16 at line 16 of /var/www/foswikidev/core/lib/Foswiki/Plugins/PreferencesPlugin.pm
# once (16µs+0s) by Config::BEGIN@11 at line 11 of Config.pm
# once (16µ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 (13µs+0s) by Time::ParseDate::BEGIN@25 at line 25 of Time/ParseDate.pm | ||||
11 | 51 | 136µs | my $callpack = caller; | ||
12 | 51 | 106µs | my (undef, @imports) = @_; | ||
13 | 51 | 16µs | my ($sym, $ch); | ||
14 | 51 | 345µs | foreach (@imports) { | ||
15 | 221 | 672µs | if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) { | ||
16 | 221 | 95µ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 | 221 | 180µ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 | 221 | 679µ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__ |