Filename | /usr/lib/perl5/5.12.4/i686-linux/Config.pm |
Statements | Executed 40 statements in 3.55ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 9.45ms | 9.80ms | AUTOLOAD | Config::
7 | 5 | 1 | 257µs | 10.5ms | FETCH | Config::
1 | 1 | 1 | 103µs | 128µs | BEGIN@9 | Config::
1 | 1 | 1 | 83µs | 83µs | import | Config::
1 | 1 | 1 | 71µs | 162µs | BEGIN@35 | Config::
1 | 1 | 1 | 34µs | 34µs | TIEHASH | 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 | 730µs | 2 | 152µs | # spent 128µs (103+24) within Config::BEGIN@9 which was called:
# once (103µs+24µs) by DynaLoader::BEGIN@25 at line 9 # spent 128µs making 1 call to Config::BEGIN@9
# spent 24µs making 1 call to strict::import |
10 | # use warnings; Pulls in Carp | ||||
11 | # use vars pulls in Carp | ||||
12 | 1 | 10µs | @Config::EXPORT = qw(%Config); | ||
13 | 1 | 8µs | @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 | 31µs | my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK); | ||
24 | |||||
25 | 1 | 2µs | our %Config; | ||
26 | |||||
27 | # Define our own import method to avoid pulling in the full Exporter: | ||||
28 | # spent 83µs within Config::import which was called:
# once (83µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm | ||||
29 | 1 | 8µs | my $pkg = shift; | ||
30 | 1 | 10µs | @_ = @Config::EXPORT unless @_; | ||
31 | |||||
32 | 1 | 9µs | my @funcs = grep $_ ne '%Config', @_; | ||
33 | 1 | 6µs | my $export_Config = @funcs < @_ ? 1 : 0; | ||
34 | |||||
35 | 3 | 1.60ms | 2 | 252µs | # spent 162µs (71+90) within Config::BEGIN@35 which was called:
# once (71µs+90µs) by DynaLoader::BEGIN@25 at line 35 # spent 162µs making 1 call to Config::BEGIN@35
# spent 90µs making 1 call to strict::unimport |
36 | 1 | 7µs | my $callpkg = caller(0); | ||
37 | 1 | 8µs | 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 | 1 | 22µs | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||
44 | 1 | 26µs | return; | ||
45 | } | ||||
46 | |||||
47 | 1 | 97µs | 1 | 35µs | die "Perl lib version (5.12.4) doesn't match executable version ($])" # spent 35µs making 1 call to version::(bool |
48 | unless $^V; | ||||
49 | |||||
50 | 1 | 67µs | 1 | 34µs | $^V eq 5.12.4 # spent 34µs making 1 call to version::(cmp |
51 | or die "Perl lib version (5.12.4) doesn't match executable version (" . | ||||
52 | sprintf("v%vd",$^V) . ")"; | ||||
53 | |||||
54 | |||||
55 | # spent 10.5ms (257µs+10.2) within Config::FETCH which was called 7 times, avg 1.50ms/call:
# 3 times (178µs+10.2ms) by List::MoreUtils::BEGIN@6 at line 43 of DynaLoader.pm, avg 3.47ms/call
# once (21µs+0s) by List::MoreUtils::BEGIN@6 at line 68 of DynaLoader.pm
# once (20µs+0s) by List::MoreUtils::BEGIN@6 at line 65 of DynaLoader.pm
# once (19µs+0s) by List::MoreUtils::BEGIN@6 at line 69 of DynaLoader.pm
# once (19µs+0s) by List::MoreUtils::BEGIN@6 at line 70 of DynaLoader.pm | ||||
56 | 7 | 38µs | my($self, $key) = @_; | ||
57 | |||||
58 | # check for cached value (which may be undef so we use exists not defined) | ||||
59 | 7 | 128µs | return $self->{$key} if exists $self->{$key}; | ||
60 | |||||
61 | 2 | 85µs | 2 | 10.0ms | return $self->fetch_string($key); # spent 9.80ms making 1 call to Config::AUTOLOAD
# spent 242µs making 1 call to Config::fetch_string |
62 | } | ||||
63 | # spent 34µs within Config::TIEHASH which was called:
# once (34µs+0s) by DynaLoader::BEGIN@25 at line 76 | ||||
64 | 1 | 45µs | bless $_[1], $_[0]; | ||
65 | } | ||||
66 | |||||
67 | sub DESTROY { } | ||||
68 | |||||
69 | # spent 9.80ms (9.45+350µs) within Config::AUTOLOAD which was called:
# once (9.45ms+350µs) by Config::FETCH at line 61 | ||||
70 | 1 | 344µs | require 'Config_heavy.pl'; | ||
71 | 1 | 97µs | 2 | 46µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 37µs making 1 call to Config::launcher
# spent 9µ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 | 176µs | 1 | 34µs | tie %Config, 'Config', { # spent 34µs making 1 call to Config::TIEHASH |
77 | archlibexp => '/usr/lib/perl5/5.12.4/i686-linux', | ||||
78 | archname => 'i686-linux', | ||||
79 | cc => 'i686-pc-linux-gnu-gcc', | ||||
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 => '5.12.3/i686-linux 5.12.3 5.12.2/i686-linux 5.12.2 5.12.1/i686-linux 5.12.1 5.12.0/i686-linux 5.12.0 ', | ||||
86 | intsize => '4', | ||||
87 | ldlibpthname => 'LD_LIBRARY_PATH', | ||||
88 | libpth => '/usr/local/lib /lib /usr/lib', | ||||
89 | osname => 'linux', | ||||
90 | osvers => '2.6.34-gentoo-r1_reiser4_unionfs', | ||||
91 | path_sep => ':', | ||||
92 | privlibexp => '/usr/lib/perl5/5.12.4', | ||||
93 | scriptdir => '/usr/bin', | ||||
94 | sitearchexp => '/usr/lib/perl5/site_perl/5.12.4/i686-linux', | ||||
95 | sitelibexp => '/usr/lib/perl5/site_perl/5.12.4', | ||||
96 | useithreads => undef, | ||||
97 | usevendorprefix => 'define', | ||||
98 | version => '5.12.4', | ||||
99 | }; |