Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux/Config.pm |
Statements | Executed 53 statements in 707µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 2.16ms | 2.26ms | AUTOLOAD | Config::
10 | 8 | 4 | 81µs | 2.52ms | FETCH | Config::
2 | 2 | 2 | 40µs | 40µs | import | Config::
1 | 1 | 1 | 24µs | 29µs | BEGIN@9 | Config::
1 | 1 | 1 | 11µs | 37µs | BEGIN@38 | Config::
1 | 1 | 1 | 6µs | 6µ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 | 2 | 110µs | 2 | 34µs | # spent 29µs (24+5) within Config::BEGIN@9 which was called:
# once (24µs+5µs) by DynaLoader::BEGIN@25 at line 9 # spent 29µs making 1 call to Config::BEGIN@9
# spent 5µs making 1 call to strict::import |
10 | # use warnings; Pulls in Carp | ||||
11 | # use vars pulls in Carp | ||||
12 | 1 | 2µs | @Config::EXPORT = qw(%Config); | ||
13 | 1 | 2µ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 | # Skip @Config::EXPORT because it only contains %Config, which we special | ||||
24 | # case below as it's not a function. @Config::EXPORT won't change in the | ||||
25 | # lifetime of Perl 5. | ||||
26 | 1 | 5µs | my %Export_Cache = map {($_ => 1)} @Config::EXPORT_OK; | ||
27 | |||||
28 | 1 | 1µs | our %Config; | ||
29 | |||||
30 | # Define our own import method to avoid pulling in the full Exporter: | ||||
31 | # spent 40µs within Config::import which was called 2 times, avg 20µs/call:
# once (22µs+0s) by Fatal::BEGIN@8 at line 8 of Fatal.pm
# once (18µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm | ||||
32 | 16 | 44µs | shift; | ||
33 | @_ = @Config::EXPORT unless @_; | ||||
34 | |||||
35 | my @funcs = grep $_ ne '%Config', @_; | ||||
36 | my $export_Config = @funcs < @_ ? 1 : 0; | ||||
37 | |||||
38 | 2 | 292µs | 2 | 64µs | # spent 37µs (11+27) within Config::BEGIN@38 which was called:
# once (11µs+27µs) by DynaLoader::BEGIN@25 at line 38 # spent 37µs making 1 call to Config::BEGIN@38
# spent 27µs making 1 call to strict::unimport |
39 | my $callpkg = caller(0); | ||||
40 | foreach my $func (@funcs) { | ||||
41 | die qq{"$func" is not exported by the Config module\n} | ||||
42 | unless $Export_Cache{$func}; | ||||
43 | *{$callpkg.'::'.$func} = \&{$func}; | ||||
44 | } | ||||
45 | |||||
46 | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||||
47 | return; | ||||
48 | } | ||||
49 | |||||
50 | 1 | 22µs | 1 | 8µs | die "Perl lib version (5.13.5) doesn't match executable '$0' version ($])" # spent 8µs making 1 call to version::(bool |
51 | unless $^V; | ||||
52 | |||||
53 | 1 | 12µs | 1 | 5µs | $^V eq 5.13.5 # spent 5µs making 1 call to version::(cmp |
54 | or die "Perl lib version (5.13.5) doesn't match executable '$0' version (" . | ||||
55 | sprintf("v%vd",$^V) . ")"; | ||||
56 | |||||
57 | |||||
58 | # spent 2.52ms (81µs+2.43) within Config::FETCH which was called 10 times, avg 252µs/call:
# 3 times (36µs+2.37ms) by Data::OptList::BEGIN@7 at line 43 of DynaLoader.pm, avg 803µs/call
# once (12µs+63µs) by Tie::RefHash::BEGIN@96 at line 100 of Tie/RefHash.pm
# once (7µs+0s) by autodie::BEGIN@6 at line 58 of Fatal.pm
# once (7µs+0s) by File::Spec::Unix::_cwd at line 378 of Cwd.pm
# once (5µs+0s) by Data::OptList::BEGIN@7 at line 63 of DynaLoader.pm
# once (5µs+0s) by Data::OptList::BEGIN@7 at line 68 of DynaLoader.pm
# once (4µs+0s) by Data::OptList::BEGIN@7 at line 67 of DynaLoader.pm
# once (4µs+0s) by Data::OptList::BEGIN@7 at line 66 of DynaLoader.pm | ||||
59 | 23 | 85µs | my($self, $key) = @_; | ||
60 | |||||
61 | # check for cached value (which may be undef so we use exists not defined) | ||||
62 | return $self->{$key} if exists $self->{$key}; | ||||
63 | |||||
64 | 3 | 2.38ms | return $self->fetch_string($key); # spent 2.26ms making 1 call to Config::AUTOLOAD
# spent 119µs making 2 calls to Config::fetch_string, avg 60µs/call | ||
65 | } | ||||
66 | # spent 6µs within Config::TIEHASH which was called:
# once (6µs+0s) by DynaLoader::BEGIN@25 at line 79 | ||||
67 | 1 | 7µs | bless $_[1], $_[0]; | ||
68 | } | ||||
69 | |||||
70 | sub DESTROY { } | ||||
71 | |||||
72 | # spent 2.26ms (2.16+96µs) within Config::AUTOLOAD which was called:
# once (2.16ms+96µs) by Config::FETCH at line 64 | ||||
73 | 2 | 94µs | require 'Config_heavy.pl'; | ||
74 | 2 | 11µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 9µs making 1 call to Config::launcher
# spent 2µs making 1 call to Config::CORE:match | ||
75 | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; | ||||
76 | } | ||||
77 | |||||
78 | # tie returns the object, so the value returned to require will be true. | ||||
79 | 1 | 29µs | 1 | 6µs | tie %Config, 'Config', { # spent 6µs making 1 call to Config::TIEHASH |
80 | archlibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux', | ||||
81 | archname => 'x86_64-linux', | ||||
82 | cc => 'cc', | ||||
83 | d_readlink => 'define', | ||||
84 | d_symlink => 'define', | ||||
85 | dlsrc => 'dl_dlopen.xs', | ||||
86 | dont_use_nlink => undef, | ||||
87 | exe_ext => '', | ||||
88 | inc_version_list => '', | ||||
89 | intsize => '4', | ||||
90 | ldlibpthname => 'LD_LIBRARY_PATH', | ||||
91 | libpth => '/usr/local/lib /lib /usr/lib /lib64 /usr/lib64', | ||||
92 | osname => 'linux', | ||||
93 | osvers => '2.6.32-5-amd64', | ||||
94 | path_sep => ':', | ||||
95 | privlibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5', | ||||
96 | scriptdir => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/bin', | ||||
97 | sitearchexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux', | ||||
98 | sitelibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5', | ||||
99 | useithreads => undef, | ||||
100 | usevendorprefix => undef, | ||||
101 | version => '5.13.5', | ||||
102 | }; |