| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux/Config.pm |
| Statements | Executed 40 statements in 2.70ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 6.04ms | 6.35ms | Config::AUTOLOAD |
| 7 | 5 | 1 | 180µs | 6.85ms | Config::FETCH |
| 1 | 1 | 1 | 78µs | 78µs | Config::CORE:subst (opcode) |
| 1 | 1 | 1 | 75µs | 93µs | Config::BEGIN@9 |
| 2 | 1 | 1 | 64µs | 64µs | Config::CORE:substcont (opcode) |
| 1 | 1 | 1 | 57µs | 57µs | Config::import |
| 1 | 1 | 1 | 36µs | 118µs | Config::BEGIN@35 |
| 1 | 1 | 1 | 35µs | 35µs | Config::CORE:pack (opcode) |
| 1 | 1 | 1 | 26µs | 26µs | Config::TIEHASH |
| 1 | 1 | 1 | 19µs | 19µs | Config::CORE:unpack (opcode) |
| 1 | 1 | 1 | 7µs | 7µs | Config::CORE:match (opcode) |
| 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 | 488µs | 2 | 110µs | # spent 93µs (75+18) within Config::BEGIN@9 which was called:
# once (75µs+18µs) by DynaLoader::BEGIN@25 at line 9 # spent 93µs making 1 call to Config::BEGIN@9
# spent 18µs making 1 call to strict::import |
| 10 | # use warnings; Pulls in Carp | ||||
| 11 | # use vars pulls in Carp | ||||
| 12 | 1 | 7µs | @Config::EXPORT = qw(%Config); | ||
| 13 | 1 | 6µ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 | 20µ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 57µs within Config::import which was called:
# once (57µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm | ||||
| 29 | 1 | 5µs | my $pkg = shift; | ||
| 30 | 1 | 6µs | @_ = @Config::EXPORT unless @_; | ||
| 31 | |||||
| 32 | 1 | 6µs | my @funcs = grep $_ ne '%Config', @_; | ||
| 33 | 1 | 4µs | my $export_Config = @funcs < @_ ? 1 : 0; | ||
| 34 | |||||
| 35 | 3 | 1.18ms | 2 | 199µs | # spent 118µs (36+82) within Config::BEGIN@35 which was called:
# once (36µs+82µs) by DynaLoader::BEGIN@25 at line 35 # spent 118µs making 1 call to Config::BEGIN@35
# spent 82µs making 1 call to strict::unimport |
| 36 | 1 | 4µs | my $callpkg = caller(0); | ||
| 37 | 1 | 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 | 1 | 14µs | *{"$callpkg\::Config"} = \%Config if $export_Config; | ||
| 44 | 1 | 16µs | return; | ||
| 45 | } | ||||
| 46 | |||||
| 47 | 1 | 62µs | 1 | 26µs | die "Perl lib version (5.10.1) doesn't match executable version ($])" # spent 26µs making 1 call to version::(bool |
| 48 | unless $^V; | ||||
| 49 | |||||
| 50 | 1 | 76µs | 1 | 31µs | $^V eq 5.10.1 # spent 31µ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 6.85ms (180µs+6.67) within Config::FETCH which was called 7 times, avg 979µs/call:
# 3 times (131µs+6.67ms) by Data::OptList::BEGIN@7 at line 43 of DynaLoader.pm, avg 2.27ms/call
# once (13µs+0s) by Data::OptList::BEGIN@7 at line 68 of DynaLoader.pm
# once (13µs+0s) by Data::OptList::BEGIN@7 at line 65 of DynaLoader.pm
# once (12µs+0s) by Data::OptList::BEGIN@7 at line 70 of DynaLoader.pm
# once (12µs+0s) by Data::OptList::BEGIN@7 at line 69 of DynaLoader.pm | ||||
| 56 | 7 | 25µs | my($self, $key) = @_; | ||
| 57 | |||||
| 58 | # check for cached value (which may be undef so we use exists not defined) | ||||
| 59 | 7 | 88µs | return $self->{$key} if exists $self->{$key}; | ||
| 60 | |||||
| 61 | 2 | 60µs | 2 | 6.53ms | return $self->fetch_string($key); # spent 6.35ms making 1 call to Config::AUTOLOAD
# spent 180µs making 1 call to Config::fetch_string |
| 62 | } | ||||
| 63 | # spent 26µs within Config::TIEHASH which was called:
# once (26µs+0s) by DynaLoader::BEGIN@25 at line 76 | ||||
| 64 | 1 | 33µs | bless $_[1], $_[0]; | ||
| 65 | } | ||||
| 66 | |||||
| 67 | sub DESTROY { } | ||||
| 68 | |||||
| 69 | # spent 6.35ms (6.04+309µs) within Config::AUTOLOAD which was called:
# once (6.04ms+309µs) by Config::FETCH at line 61 | ||||
| 70 | 1 | 213µs | require 'Config_heavy.pl'; | ||
| 71 | 1 | 80µs | 2 | 35µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 28µs making 1 call to Config::launcher
# spent 7µ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 | 292µs | 1 | 26µs | tie %Config, 'Config', { # spent 26µs making 1 call to Config::TIEHASH |
| 77 | archlibexp => '/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux', | ||||
| 78 | archname => 'x86_64-linux', | ||||
| 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 => 'LD_LIBRARY_PATH', | ||||
| 88 | libpth => '/usr/local/lib /lib /usr/lib', | ||||
| 89 | osname => 'linux', | ||||
| 90 | osvers => '2.6.34-arch', | ||||
| 91 | path_sep => ':', | ||||
| 92 | privlibexp => '/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1', | ||||
| 93 | scriptdir => '/home/doy/perl5/perlbrew/perls/perl-5.10.1/bin', | ||||
| 94 | sitearchexp => '/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux', | ||||
| 95 | sitelibexp => '/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1', | ||||
| 96 | useithreads => undef, | ||||
| 97 | usevendorprefix => undef, | ||||
| 98 | version => '5.10.1', | ||||
| 99 | }; | ||||
# spent 7µs within Config::CORE:match which was called:
# once (7µs+0s) by Config::AUTOLOAD at line 71 | |||||
# spent 35µs within Config::CORE:pack which was called:
# once (35µs+0s) by Config::AUTOLOAD at line 1167 of Config_heavy.pl | |||||
# spent 78µs within Config::CORE:subst which was called:
# once (78µs+0s) by Config::AUTOLOAD at line 1168 of Config_heavy.pl | |||||
# spent 64µs within Config::CORE:substcont which was called 2 times, avg 32µs/call:
# 2 times (64µs+0s) by Config::AUTOLOAD at line 1168 of Config_heavy.pl, avg 32µs/call | |||||
# spent 19µs within Config::CORE:unpack which was called:
# once (19µs+0s) by Config::AUTOLOAD at line 1167 of Config_heavy.pl |