Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux/Config.pm |
Statements | Executed 85 statements in 663µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.62ms | 1.72ms | AUTOLOAD | Config::
13 | 10 | 6 | 65µs | 1.93ms | FETCH | Config::
5 | 5 | 5 | 65µs | 65µs | import | Config::
1 | 1 | 1 | 36µs | 36µs | CORE:subst (opcode) | Config::
2 | 1 | 1 | 29µs | 29µs | CORE:substcont (opcode) | Config::
1 | 1 | 1 | 12µs | 12µs | CORE:pack (opcode) | Config::
1 | 1 | 1 | 11µs | 15µs | BEGIN@9 | Config::
1 | 1 | 1 | 6µs | 39µs | BEGIN@35 | Config::
1 | 1 | 1 | 6µs | 6µs | TIEHASH | Config::
1 | 1 | 1 | 6µs | 6µs | CORE:unpack (opcode) | Config::
1 | 1 | 1 | 2µs | 2µs | CORE:match (opcode) | Config::
0 | 0 | 0 | 0s | 0s | DESTROY | Config::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # This file was created by configpm when Perl was built. Any changes | ||||
2 | # made to this file will be lost the next time perl is built. | ||||
3 | |||||
4 | # for a description of the variables, please have a look at the | ||||
5 | # Glossary file, as written in the Porting folder, or use the url: | ||||
6 | # http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary | ||||
7 | |||||
8 | package Config; | ||||
9 | 3 | 116µs | 2 | 18µs | # spent 15µs (11+3) within Config::BEGIN@9 which was called:
# once (11µs+3µs) by DynaLoader::BEGIN@25 at line 9 # spent 15µs making 1 call to Config::BEGIN@9
# spent 3µs making 1 call to strict::import |
10 | # use warnings; Pulls in Carp | ||||
11 | # use vars pulls in Carp | ||||
12 | 1 | 1µs | @Config::EXPORT = qw(%Config); | ||
13 | 1 | 900ns | @Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re); | ||
14 | |||||
15 | # Need to stub all the functions to make code such as print Config::config_sh | ||||
16 | # keep working | ||||
17 | |||||
18 | sub myconfig; | ||||
19 | sub config_sh; | ||||
20 | sub config_vars; | ||||
21 | sub config_re; | ||||
22 | |||||
23 | 1 | 6µs | my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK); | ||
24 | |||||
25 | 1 | 200ns | our %Config; | ||
26 | |||||
27 | # Define our own import method to avoid pulling in the full Exporter: | ||||
28 | # spent 65µs within Config::import which was called 5 times, avg 13µs/call:
# once (14µs+0s) by Test::Builder::BEGIN@19 at line 19 of Test/Builder.pm
# once (14µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm
# once (14µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm
# once (13µs+0s) by Memoize::BEGIN@28 at line 28 of Memoize.pm
# once (9µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm | ||||
29 | 40 | 77µs | my $pkg = shift; | ||
30 | @_ = @Config::EXPORT unless @_; | ||||
31 | |||||
32 | my @funcs = grep $_ ne '%Config', @_; | ||||
33 | my $export_Config = @funcs < @_ ? 1 : 0; | ||||
34 | |||||
35 | 3 | 239µs | 2 | 72µs | # spent 39µs (6+33) within Config::BEGIN@35 which was called:
# once (6µs+33µs) by DynaLoader::BEGIN@25 at line 35 # spent 39µs making 1 call to Config::BEGIN@35
# spent 33µs making 1 call to strict::unimport |
36 | my $callpkg = caller(0); | ||||
37 | foreach my $func (@funcs) { | ||||
38 | die sprintf qq{"%s" is not exported by the %s module\n}, | ||||
39 | $func, __PACKAGE__ unless $Export_Cache{$func}; | ||||
40 | *{$callpkg.'::'.$func} = \&{$func}; | ||||
41 | } | ||||
42 | |||||
43 | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||||
44 | return; | ||||
45 | } | ||||
46 | |||||
47 | 1 | 20µs | 1 | 10µs | die "Perl lib version (5.12.3) doesn't match executable version ($])" # spent 10µs making 1 call to version::(bool |
48 | unless $^V; | ||||
49 | |||||
50 | 1 | 10µs | 1 | 6µs | $^V eq 5.12.3 # spent 6µs making 1 call to version::(cmp |
51 | or die "Perl lib version (5.12.3) doesn't match executable version (" . | ||||
52 | sprintf("v%vd",$^V) . ")"; | ||||
53 | |||||
54 | |||||
55 | # spent 1.93ms (65µs+1.87) within Config::FETCH which was called 13 times, avg 149µs/call:
# 3 times (30µs+1.81ms) by Data::OptList::BEGIN@10 at line 43 of DynaLoader.pm, avg 613µs/call
# 2 times (7µs+0s) by File::Slurp::BEGIN@12 at line 11 of Errno.pm, avg 3µs/call
# once (7µs+60µs) by Memoize::memoize at line 71 of Memoize.pm
# once (6µs+0s) by Module::Find::BEGIN@8 at line 1337 of File/Find.pm
# once (5µs+0s) by Data::Compare::BEGIN@24 at line 378 of Cwd.pm
# once (4µs+0s) by Test::Builder::BEGIN@18 at line 22 of Test/Builder.pm
# once (2µs+0s) by Data::OptList::BEGIN@10 at line 65 of DynaLoader.pm
# once (2µs+0s) by Data::OptList::BEGIN@10 at line 68 of DynaLoader.pm
# once (1µs+0s) by Data::OptList::BEGIN@10 at line 70 of DynaLoader.pm
# once (1µs+0s) by Data::OptList::BEGIN@10 at line 69 of DynaLoader.pm | ||||
56 | 29 | 94µs | my($self, $key) = @_; | ||
57 | |||||
58 | # check for cached value (which may be undef so we use exists not defined) | ||||
59 | return $self->{$key} if exists $self->{$key}; | ||||
60 | |||||
61 | 3 | 1.82ms | return $self->fetch_string($key); # spent 1.72ms making 1 call to Config::AUTOLOAD
# spent 108µs making 2 calls to Config::fetch_string, avg 54µs/call | ||
62 | } | ||||
63 | # spent 6µs within Config::TIEHASH which was called:
# once (6µs+0s) by DynaLoader::BEGIN@25 at line 76 | ||||
64 | 1 | 8µs | bless $_[1], $_[0]; | ||
65 | } | ||||
66 | |||||
67 | sub DESTROY { } | ||||
68 | |||||
69 | # spent 1.72ms (1.62+94µs) within Config::AUTOLOAD which was called:
# once (1.62ms+94µs) by Config::FETCH at line 61 | ||||
70 | 2 | 63µs | require 'Config_heavy.pl'; | ||
71 | 2 | 9µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 7µs making 1 call to Config::launcher
# spent 2µs making 1 call to Config::CORE:match | ||
72 | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; | ||||
73 | } | ||||
74 | |||||
75 | # tie returns the object, so the value returned to require will be true. | ||||
76 | 1 | 28µs | 1 | 6µs | tie %Config, 'Config', { # spent 6µs making 1 call to Config::TIEHASH |
77 | archlibexp => '/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/x86_64-linux', | ||||
78 | archname => 'x86_64-linux', | ||||
79 | cc => 'cc', | ||||
80 | d_readlink => 'define', | ||||
81 | d_symlink => 'define', | ||||
82 | dlsrc => 'dl_dlopen.xs', | ||||
83 | dont_use_nlink => undef, | ||||
84 | exe_ext => '', | ||||
85 | inc_version_list => ' ', | ||||
86 | intsize => '4', | ||||
87 | ldlibpthname => 'LD_LIBRARY_PATH', | ||||
88 | libpth => '/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib', | ||||
89 | osname => 'linux', | ||||
90 | osvers => '3.0.0-14-generic', | ||||
91 | path_sep => ':', | ||||
92 | privlibexp => '/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3', | ||||
93 | scriptdir => '/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/bin', | ||||
94 | sitearchexp => '/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux', | ||||
95 | sitelibexp => '/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3', | ||||
96 | useithreads => undef, | ||||
97 | usevendorprefix => undef, | ||||
98 | version => '5.12.3', | ||||
99 | }; | ||||
# spent 2µs within Config::CORE:match which was called:
# once (2µs+0s) by Config::AUTOLOAD at line 71 | |||||
# spent 12µs within Config::CORE:pack which was called:
# once (12µs+0s) by Config::AUTOLOAD at line 1210 of Config_heavy.pl | |||||
# spent 36µs within Config::CORE:subst which was called:
# once (36µs+0s) by Config::AUTOLOAD at line 1211 of Config_heavy.pl | |||||
# spent 29µs within Config::CORE:substcont which was called 2 times, avg 15µs/call:
# 2 times (29µs+0s) by Config::AUTOLOAD at line 1211 of Config_heavy.pl, avg 15µs/call | |||||
# spent 6µs within Config::CORE:unpack which was called:
# once (6µs+0s) by Config::AUTOLOAD at line 1210 of Config_heavy.pl |