Filename | /usr/lib/perl/5.14/Config.pm |
Statements | Executed 51 statements in 1.37ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 51µs | 51µs | import | Config::
9 | 7 | 3 | 47µs | 47µs | FETCH | Config::
1 | 1 | 1 | 27µs | 35µs | BEGIN@9 | Config::
1 | 1 | 1 | 15µs | 45µs | BEGIN@45 | Config::
1 | 1 | 1 | 14µs | 26µs | BEGIN@10 | Config::
1 | 1 | 1 | 13µs | 55µs | BEGIN@11 | Config::
1 | 1 | 1 | 11µs | 11µs | TIEHASH | Config::
0 | 0 | 0 | 0s | 0s | AUTOLOAD | 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 | 2 | 53µs | 2 | 43µs | # spent 35µs (27+8) within Config::BEGIN@9 which was called:
# once (27µs+8µs) by DynaLoader::BEGIN@21 at line 9 # spent 35µs making 1 call to Config::BEGIN@9
# spent 8µs making 1 call to strict::import |
10 | 2 | 50µs | 2 | 38µs | # spent 26µs (14+12) within Config::BEGIN@10 which was called:
# once (14µs+12µs) by DynaLoader::BEGIN@21 at line 10 # spent 26µs making 1 call to Config::BEGIN@10
# spent 12µs making 1 call to warnings::import |
11 | 2 | 299µs | 2 | 97µs | # spent 55µs (13+42) within Config::BEGIN@11 which was called:
# once (13µs+42µs) by DynaLoader::BEGIN@21 at line 11 # spent 55µs making 1 call to Config::BEGIN@11
# spent 42µs making 1 call to vars::import |
12 | |||||
13 | # Skip @Config::EXPORT because it only contains %Config, which we special | ||||
14 | # case below as it's not a function. @Config::EXPORT won't change in the | ||||
15 | # lifetime of Perl 5. | ||||
16 | 1 | 8µs | my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1, | ||
17 | config_re => 1, compile_date => 1, local_patches => 1, | ||||
18 | bincompat_options => 1, non_bincompat_options => 1, | ||||
19 | header_files => 1); | ||||
20 | |||||
21 | 1 | 2µs | @Config::EXPORT = qw(%Config); | ||
22 | 1 | 7µs | @Config::EXPORT_OK = keys %Export_Cache; | ||
23 | |||||
24 | # Need to stub all the functions to make code such as print Config::config_sh | ||||
25 | # keep working | ||||
26 | |||||
27 | sub bincompat_options; | ||||
28 | sub compile_date; | ||||
29 | sub config_re; | ||||
30 | sub config_sh; | ||||
31 | sub config_vars; | ||||
32 | sub header_files; | ||||
33 | sub local_patches; | ||||
34 | sub myconfig; | ||||
35 | sub non_bincompat_options; | ||||
36 | |||||
37 | # Define our own import method to avoid pulling in the full Exporter: | ||||
38 | # spent 51µs within Config::import which was called 2 times, avg 26µs/call:
# once (32µs+0s) by DynaLoader::BEGIN@21 at line 21 of DynaLoader.pm
# once (20µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm | ||||
39 | 2 | 1µs | shift; | ||
40 | 2 | 7µs | @_ = @Config::EXPORT unless @_; | ||
41 | |||||
42 | 2 | 8µs | my @funcs = grep $_ ne '%Config', @_; | ||
43 | 2 | 6µs | my $export_Config = @funcs < @_ ? 1 : 0; | ||
44 | |||||
45 | 2 | 644µs | 2 | 74µs | # spent 45µs (15+29) within Config::BEGIN@45 which was called:
# once (15µs+29µs) by DynaLoader::BEGIN@21 at line 45 # spent 45µs making 1 call to Config::BEGIN@45
# spent 29µs making 1 call to strict::unimport |
46 | 2 | 3µs | my $callpkg = caller(0); | ||
47 | 2 | 4µs | foreach my $func (@funcs) { | ||
48 | die qq{"$func" is not exported by the Config module\n} | ||||
49 | unless $Export_Cache{$func}; | ||||
50 | *{$callpkg.'::'.$func} = \&{$func}; | ||||
51 | } | ||||
52 | |||||
53 | 4 | 17µs | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||
54 | 2 | 26µs | return; | ||
55 | } | ||||
56 | |||||
57 | 1 | 46µs | 1 | 14µs | die "Perl lib version (5.14.2) doesn't match executable '$0' version ($])" # spent 14µs making 1 call to version::(bool |
58 | unless $^V; | ||||
59 | |||||
60 | 1 | 25µs | 1 | 13µs | $^V eq 5.14.2 # spent 13µs making 1 call to version::(cmp |
61 | or die "Perl lib version (5.14.2) doesn't match executable '$0' version (" . | ||||
62 | sprintf("v%vd",$^V) . ")"; | ||||
63 | |||||
64 | # spent 47µs within Config::FETCH which was called 9 times, avg 5µs/call:
# 3 times (18µs+0s) by main::BEGIN@6 at line 39 of DynaLoader.pm, avg 6µs/call
# once (8µs+0s) by DateTime::TimeZone::Local::Unix::BEGIN@12 at line 209 of Cwd.pm
# once (6µs+0s) by DateTime::TimeZone::Local::Unix::_FindMatchingZoneinfoFile at line 1107 of File/Find.pm
# once (4µs+0s) by main::BEGIN@6 at line 58 of DynaLoader.pm
# once (4µs+0s) by main::BEGIN@6 at line 60 of DynaLoader.pm
# once (4µs+0s) by main::BEGIN@6 at line 62 of DynaLoader.pm
# once (3µs+0s) by main::BEGIN@6 at line 61 of DynaLoader.pm | ||||
65 | 9 | 11µs | my($self, $key) = @_; | ||
66 | |||||
67 | # check for cached value (which may be undef so we use exists not defined) | ||||
68 | 9 | 76µs | return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); | ||
69 | } | ||||
70 | |||||
71 | # spent 11µs within Config::TIEHASH which was called:
# once (11µs+0s) by DynaLoader::BEGIN@21 at line 84 | ||||
72 | 1 | 14µs | bless $_[1], $_[0]; | ||
73 | } | ||||
74 | |||||
75 | sub DESTROY { } | ||||
76 | |||||
77 | sub AUTOLOAD { | ||||
78 | require 'Config_heavy.pl'; | ||||
79 | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; | ||||
80 | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; | ||||
81 | } | ||||
82 | |||||
83 | # tie returns the object, so the value returned to require will be true. | ||||
84 | 1 | 60µs | 1 | 11µs | tie %Config, 'Config', { # spent 11µs making 1 call to Config::TIEHASH |
85 | archlibexp => '/usr/lib/perl/5.14', | ||||
86 | archname => 'x86_64-linux-gnu-thread-multi', | ||||
87 | cc => 'cc', | ||||
88 | d_readlink => 'define', | ||||
89 | d_symlink => 'define', | ||||
90 | dlext => 'so', | ||||
91 | dlsrc => 'dl_dlopen.xs', | ||||
92 | dont_use_nlink => undef, | ||||
93 | exe_ext => '', | ||||
94 | inc_version_list => '', | ||||
95 | intsize => '4', | ||||
96 | ldlibpthname => 'LD_LIBRARY_PATH', | ||||
97 | libpth => '/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib', | ||||
98 | osname => 'linux', | ||||
99 | osvers => '3.2.0-4-amd64', | ||||
100 | path_sep => ':', | ||||
101 | privlibexp => '/usr/share/perl/5.14', | ||||
102 | scriptdir => '/usr/bin', | ||||
103 | sitearchexp => '/usr/local/lib/perl/5.14.2', | ||||
104 | sitelibexp => '/usr/local/share/perl/5.14.2', | ||||
105 | so => 'so', | ||||
106 | useithreads => 'define', | ||||
107 | usevendorprefix => 'define', | ||||
108 | version => '5.14.2', | ||||
109 | }; |