| Filename | /usr/lib/perl/5.10/Config.pm |
| Statements | Executed 40 statements in 946µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 3.26ms | 3.49ms | Config::AUTOLOAD |
| 7 | 5 | 1 | 71µs | 3.72ms | Config::FETCH |
| 1 | 1 | 1 | 28µs | 40µs | Config::BEGIN@9 |
| 1 | 1 | 1 | 19µs | 19µs | Config::import |
| 1 | 1 | 1 | 14µs | 39µs | Config::BEGIN@35 |
| 1 | 1 | 1 | 8µs | 8µs | Config::TIEHASH |
| 0 | 0 | 0 | 0s | 0s | Config::DESTROY |
| 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 | 190µs | 2 | 52µs | # spent 40µs (28+12) within Config::BEGIN@9 which was called:
# once (28µs+12µs) by DynaLoader::BEGIN@24 at line 9 # spent 40µs making 1 call to Config::BEGIN@9
# spent 12µs making 1 call to strict::import |
| 10 | # use warnings; Pulls in Carp | ||||
| 11 | # use vars pulls in Carp | ||||
| 12 | 1 | 3µs | @Config::EXPORT = qw(%Config); | ||
| 13 | 1 | 3µ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 | 1µs | our %Config; | ||
| 26 | |||||
| 27 | # Define our own import method to avoid pulling in the full Exporter: | ||||
| 28 | # spent 19µs within Config::import which was called:
# once (19µs+0s) by DynaLoader::BEGIN@24 at line 24 of DynaLoader.pm | ||||
| 29 | 1 | 2µs | my $pkg = shift; | ||
| 30 | 1 | 3µs | @_ = @Config::EXPORT unless @_; | ||
| 31 | |||||
| 32 | 1 | 2µs | my @funcs = grep $_ ne '%Config', @_; | ||
| 33 | 1 | 1µs | my $export_Config = @funcs < @_ ? 1 : 0; | ||
| 34 | |||||
| 35 | 3 | 434µs | 2 | 64µs | # spent 39µs (14+25) within Config::BEGIN@35 which was called:
# once (14µs+25µs) by DynaLoader::BEGIN@24 at line 35 # spent 39µs making 1 call to Config::BEGIN@35
# spent 25µs making 1 call to strict::unimport |
| 36 | 1 | 1µs | my $callpkg = caller(0); | ||
| 37 | 1 | 3µ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 | 4µs | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||
| 44 | 1 | 7µs | return; | ||
| 45 | } | ||||
| 46 | |||||
| 47 | 1 | 22µs | 1 | 9µs | die "Perl lib version (5.10.1) doesn't match executable version ($])" # spent 9µs making 1 call to version::(bool |
| 48 | unless $^V; | ||||
| 49 | |||||
| 50 | 1 | 17µs | 1 | 9µs | $^V eq 5.10.1 # spent 9µ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 | # spent 3.72ms (71µs+3.65) within Config::FETCH which was called 7 times, avg 531µs/call:
# 3 times (52µs+3.65ms) by MARC::Charset::BEGIN@10 at line 42 of DynaLoader.pm, avg 1.23ms/call
# once (6µs+0s) by MARC::Charset::BEGIN@10 at line 64 of DynaLoader.pm
# once (5µs+0s) by MARC::Charset::BEGIN@10 at line 63 of DynaLoader.pm
# once (4µs+0s) by MARC::Charset::BEGIN@10 at line 61 of DynaLoader.pm
# once (4µs+0s) by MARC::Charset::BEGIN@10 at line 65 of DynaLoader.pm | ||||
| 55 | 7 | 11µs | my($self, $key) = @_; | ||
| 56 | |||||
| 57 | # check for cached value (which may be undef so we use exists not defined) | ||||
| 58 | 7 | 33µs | return $self->{$key} if exists $self->{$key}; | ||
| 59 | |||||
| 60 | 2 | 23µs | 2 | 3.56ms | return $self->fetch_string($key); # spent 3.49ms making 1 call to Config::AUTOLOAD
# spent 71µs making 1 call to Config::fetch_string |
| 61 | } | ||||
| 62 | # spent 8µs within Config::TIEHASH which was called:
# once (8µs+0s) by DynaLoader::BEGIN@24 at line 75 | ||||
| 63 | 1 | 11µs | bless $_[1], $_[0]; | ||
| 64 | } | ||||
| 65 | |||||
| 66 | sub DESTROY { } | ||||
| 67 | |||||
| 68 | # spent 3.49ms (3.26+228µs) within Config::AUTOLOAD which was called:
# once (3.26ms+228µs) by Config::FETCH at line 60 | ||||
| 69 | 1 | 96µs | require 'Config_heavy.pl'; | ||
| 70 | 1 | 27µs | 2 | 19µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 16µs making 1 call to Config::launcher
# spent 3µs making 1 call to Config::CORE:match |
| 71 | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; | ||||
| 72 | } | ||||
| 73 | |||||
| 74 | # tie returns the object, so the value returned to require will be true. | ||||
| 75 | 1 | 44µs | 1 | 8µs | tie %Config, 'Config', { # spent 8µs making 1 call to Config::TIEHASH |
| 76 | archlibexp => '/usr/lib/perl/5.10', | ||||
| 77 | archname => 'i486-linux-gnu-thread-multi', | ||||
| 78 | cc => 'cc', | ||||
| 79 | d_readlink => 'define', | ||||
| 80 | d_symlink => 'define', | ||||
| 81 | dlsrc => 'dl_dlopen.xs', | ||||
| 82 | dont_use_nlink => undef, | ||||
| 83 | exe_ext => '', | ||||
| 84 | inc_version_list => '5.10.0', | ||||
| 85 | intsize => '4', | ||||
| 86 | ldlibpthname => 'LD_LIBRARY_PATH', | ||||
| 87 | libpth => '/usr/local/lib /lib /usr/lib /usr/lib64', | ||||
| 88 | osname => 'linux', | ||||
| 89 | osvers => '2.6.32.17-dsa-ia32', | ||||
| 90 | path_sep => ':', | ||||
| 91 | privlibexp => '/usr/share/perl/5.10', | ||||
| 92 | scriptdir => '/usr/bin', | ||||
| 93 | sitearchexp => '/usr/local/lib/perl/5.10.1', | ||||
| 94 | sitelibexp => '/usr/local/share/perl/5.10.1', | ||||
| 95 | useithreads => 'define', | ||||
| 96 | usevendorprefix => 'define', | ||||
| 97 | version => '5.10.1', | ||||
| 98 | }; |