File | /usr/local/lib/perl5/5.10.1/darwin-2level/Config.pm |
Statements Executed | 87 |
Statement Execution Time | 952µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.16ms | 1.26ms | AUTOLOAD | Config::
5 | 5 | 5 | 94µs | 94µs | import | Config::
14 | 11 | 5 | 66µs | 1.42ms | FETCH | Config::
1 | 1 | 2 | 36µs | 36µs | CORE:subst (opcode) | Config::
1 | 1 | 2 | 22µs | 22µs | CORE:pack (opcode) | Config::
2 | 1 | 2 | 20µs | 20µs | CORE:substcont (opcode) | Config::
1 | 1 | 1 | 18µs | 21µs | BEGIN@9 | Config::
1 | 1 | 1 | 10µs | 10µs | TIEHASH | Config::
1 | 1 | 2 | 10µs | 10µs | CORE:unpack (opcode) | Config::
1 | 1 | 1 | 9µs | 31µs | BEGIN@35 | Config::
1 | 1 | 2 | 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 | 133µs | 2 | 25µs | # spent 21µs (18+4) within Config::BEGIN@9 which was called
# once (18µs+4µs) by Test::Builder::BEGIN@19 at line 9 # spent 21µs making 1 call to Config::BEGIN@9
# spent 4µ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 | 1µ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 | 8µs | my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK); | ||
24 | |||||
25 | 1 | 100ns | our %Config; | ||
26 | |||||
27 | # Define our own import method to avoid pulling in the full Exporter: | ||||
28 | # spent 94µs within Config::import which was called 5 times, avg 19µs/call:
# once (27µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm
# once (21µs+0s) by lib::BEGIN@6 at line 6 of lib.pm
# once (16µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm
# once (16µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm
# once (15µs+0s) by Test::Builder::BEGIN@19 at line 19 of Test/Builder.pm | ||||
29 | 5 | 5µs | my $pkg = shift; | ||
30 | 5 | 14µs | @_ = @Config::EXPORT unless @_; | ||
31 | |||||
32 | 5 | 12µs | my @funcs = grep $_ ne '%Config', @_; | ||
33 | 5 | 7µs | my $export_Config = @funcs < @_ ? 1 : 0; | ||
34 | |||||
35 | 3 | 361µs | 2 | 52µs | # spent 31µs (9+22) within Config::BEGIN@35 which was called
# once (9µs+22µs) by Test::Builder::BEGIN@19 at line 35 # spent 31µs making 1 call to Config::BEGIN@35
# spent 22µs making 1 call to strict::unimport |
36 | 5 | 5µs | my $callpkg = caller(0); | ||
37 | 5 | 7µ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 | 5 | 29µs | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||
44 | 5 | 43µs | return; | ||
45 | } | ||||
46 | |||||
47 | 1 | 26µs | 1 | 11µs | die "Perl lib version (5.10.1) doesn't match executable version ($])" # spent 11µs making 1 call to version::(bool |
48 | unless $^V; | ||||
49 | |||||
50 | 1 | 23µs | 1 | 12µs | $^V eq 5.10.1 # spent 12µs making 1 call to version::(cmp |
51 | or die "Perl lib version (5.10.1) doesn't match executable version (" . | ||||
52 | sprintf("v%vd",$^V) . ")"; | ||||
53 | |||||
54 | |||||
55 | # spent 1.42ms (66µs+1.35) within Config::FETCH which was called 14 times, avg 101µs/call:
# 3 times (24µs+1.32ms) by base::import at line 43 of DynaLoader.pm, avg 448µs/call
# 2 times (9µs+0s) by LWP::Protocol::http::BEGIN@216 at line 11 of Errno.pm, avg 5µs/call
# once (11µs+30µs) by LWP::UserAgent::BEGIN@12 at line 38 of Time/Local.pm
# once (5µs+0s) by main::BEGIN@2 at line 10 of lib.pm
# once (4µs+0s) by Test::Builder::BEGIN@18 at line 22 of Test/Builder.pm
# once (3µs+0s) by main::BEGIN@2 at line 11 of lib.pm
# once (3µs+0s) by main::BEGIN@2 at line 12 of lib.pm
# once (2µs+0s) by base::import at line 65 of DynaLoader.pm
# once (2µs+0s) by base::import at line 70 of DynaLoader.pm
# once (2µs+0s) by base::import at line 68 of DynaLoader.pm
# once (1µs+0s) by base::import at line 69 of DynaLoader.pm | ||||
56 | 14 | 11µs | my($self, $key) = @_; | ||
57 | |||||
58 | # check for cached value (which may be undef so we use exists not defined) | ||||
59 | 14 | 111µs | return $self->{$key} if exists $self->{$key}; | ||
60 | |||||
61 | 3 | 17µs | 3 | 1.32ms | return $self->fetch_string($key); # spent 1.26ms making 1 call to Config::AUTOLOAD
# spent 56µs making 2 calls to Config::fetch_string, avg 28µs/call |
62 | } | ||||
63 | # spent 10µs within Config::TIEHASH which was called
# once (10µs+0s) by Test::Builder::BEGIN@19 at line 76 | ||||
64 | 1 | 13µs | bless $_[1], $_[0]; | ||
65 | } | ||||
66 | |||||
67 | sub DESTROY { } | ||||
68 | |||||
69 | # spent 1.26ms (1.16+104µs) within Config::AUTOLOAD which was called
# once (1.16ms+104µs) by Config::FETCH at line 61 | ||||
70 | 1 | 60µs | require 'Config_heavy.pl'; | ||
71 | 1 | 14µs | 2 | 11µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 10µ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 | 53µs | 1 | 10µs | tie %Config, 'Config', { # spent 10µs making 1 call to Config::TIEHASH |
77 | archlibexp => '/usr/local/lib/perl5/5.10.1/darwin-2level', | ||||
78 | archname => 'darwin-2level', | ||||
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 => 'DYLD_LIBRARY_PATH', | ||||
88 | libpth => '/usr/local/lib /usr/lib', | ||||
89 | osname => 'darwin', | ||||
90 | osvers => '10.2.0', | ||||
91 | path_sep => ':', | ||||
92 | privlibexp => '/usr/local/lib/perl5/5.10.1', | ||||
93 | scriptdir => '/usr/local/bin', | ||||
94 | sitearchexp => '/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level', | ||||
95 | sitelibexp => '/usr/local/lib/perl5/site_perl/5.10.1', | ||||
96 | useithreads => undef, | ||||
97 | usevendorprefix => undef, | ||||
98 | version => '5.10.1', | ||||
99 | }; | ||||
# spent 2µs within Config::CORE:match which was called
# once (2µs+0s) by Config::AUTOLOAD at line 71 of Config.pm | |||||
# spent 22µs within Config::CORE:pack which was called
# once (22µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl | |||||
# spent 36µs within Config::CORE:subst which was called
# once (36µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl | |||||
# spent 20µs within Config::CORE:substcont which was called 2 times, avg 10µs/call:
# 2 times (20µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl, avg 10µs/call | |||||
# spent 10µs within Config::CORE:unpack which was called
# once (10µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl |