| File | /usr/lib/perl/5.8/Config.pm | Statements Executed | 40 | Total Time | 0.000964 seconds |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine | |
|---|---|---|---|---|---|---|
| 5 | 5 | 2 | 7.3e-5 | 7.3e-5 | Config:: | FETCH |
| 2 | 2 | 2 | 7.3e-5 | 7.3e-5 | Config:: | import |
| 0 | 0 | 0 | 0 | 0 | Config:: | AUTOLOAD |
| 0 | 0 | 0 | 0 | 0 | Config:: | BEGIN |
| 0 | 0 | 0 | 0 | 0 | Config:: | DESTROY |
| 0 | 0 | 0 | 0 | 0 | Config:: | TIEHASH |
| Line | Stmts. | Exclusive Time | Avg. | 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 | package Config; | |||
| 5 | 3 | 0.00024 | 8.0e-5 | use strict; # spent 23µs making 1 call to strict::import |
| 6 | # use warnings; Pulls in Carp | |||
| 7 | # use vars pulls in Carp | |||
| 8 | 1 | 4.0e-6 | 4.0e-6 | @Config::EXPORT = qw(%Config); |
| 9 | 1 | 3.0e-6 | 3.0e-6 | @Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re); |
| 10 | ||||
| 11 | # Need to stub all the functions to make code such as print Config::config_sh | |||
| 12 | # keep working | |||
| 13 | ||||
| 14 | sub myconfig; | |||
| 15 | sub config_sh; | |||
| 16 | sub config_vars; | |||
| 17 | sub config_re; | |||
| 18 | ||||
| 19 | 1 | 1.9e-5 | 1.9e-5 | my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK); |
| 20 | ||||
| 21 | 1 | 2.0e-6 | 2.0e-6 | our %Config; |
| 22 | ||||
| 23 | # Define our own import method to avoid pulling in the full Exporter: | |||
| 24 | # spent 73µs within Config::import which was called 2 times, avg 36µs/call:
# once (37µs+0) by DynaLoader::BEGIN at line 24 of /usr/lib/perl/5.8/DynaLoader.pm
# once (36µs+0) at line 5 of /usr/share/perl/5.8/Time/Local.pm | |||
| 25 | 2 | 4.0e-6 | 2.0e-6 | my $pkg = shift; |
| 26 | 2 | 9.0e-6 | 4.5e-6 | @_ = @Config::EXPORT unless @_; |
| 27 | ||||
| 28 | 2 | 6.0e-6 | 3.0e-6 | my @funcs = grep $_ ne '%Config', @_; |
| 29 | 2 | 4.0e-6 | 2.0e-6 | my $export_Config = @funcs < @_ ? 1 : 0; |
| 30 | ||||
| 31 | 3 | 0.00053 | 0.00018 | no strict 'refs'; # spent 45µs making 1 call to strict::unimport |
| 32 | 2 | 4.0e-6 | 2.0e-6 | my $callpkg = caller(0); |
| 33 | 2 | 6.0e-6 | 3.0e-6 | foreach my $func (@funcs) { |
| 34 | die sprintf qq{"%s" is not exported by the %s module\n}, | |||
| 35 | $func, __PACKAGE__ unless $Export_Cache{$func}; | |||
| 36 | *{$callpkg.'::'.$func} = \&{$func}; | |||
| 37 | } | |||
| 38 | ||||
| 39 | 2 | 1.6e-5 | 8.0e-6 | *{"$callpkg\::Config"} = \%Config if $export_Config; |
| 40 | 2 | 8.0e-6 | 4.0e-6 | return; |
| 41 | } | |||
| 42 | ||||
| 43 | 1 | 1.0e-6 | 1.0e-6 | die "Perl lib version (v5.8.8) doesn't match executable version ($])" |
| 44 | unless $^V; | |||
| 45 | ||||
| 46 | 1 | 7.0e-6 | 7.0e-6 | $^V eq v5.8.8 |
| 47 | or die "Perl lib version (v5.8.8) doesn't match executable version (" . | |||
| 48 | sprintf("v%vd",$^V) . ")"; | |||
| 49 | ||||
| 50 | # spent 73µs within Config::FETCH which was called 5 times, avg 15µs/call:
# once (19µs+0) at line 34 of /usr/share/perl/5.8/Time/Local.pm
# once (18µs+0) at line 78 of /usr/lib/perl/5.8/DynaLoader.pm
# once (13µs+0) at line 80 of /usr/lib/perl/5.8/DynaLoader.pm
# once (12µs+0) at line 82 of /usr/lib/perl/5.8/DynaLoader.pm
# once (11µs+0) at line 81 of /usr/lib/perl/5.8/DynaLoader.pm | |||
| 51 | 5 | 9.0e-6 | 1.8e-6 | my($self, $key) = @_; |
| 52 | ||||
| 53 | # check for cached value (which may be undef so we use exists not defined) | |||
| 54 | 5 | 2.5e-5 | 5.0e-6 | return $self->{$key} if exists $self->{$key}; |
| 55 | ||||
| 56 | return $self->fetch_string($key); | |||
| 57 | } | |||
| 58 | sub TIEHASH { | |||
| 59 | 1 | 3.0e-6 | 3.0e-6 | bless $_[1], $_[0]; |
| 60 | } | |||
| 61 | ||||
| 62 | sub DESTROY { } | |||
| 63 | ||||
| 64 | sub AUTOLOAD { | |||
| 65 | require 'Config_heavy.pl'; | |||
| 66 | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; | |||
| 67 | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; | |||
| 68 | } | |||
| 69 | ||||
| 70 | # tie returns the object, so the value returned to require will be true. | |||
| 71 | 1 | 6.3e-5 | 6.3e-5 | tie %Config, 'Config', { |
| 72 | archlibexp => '/usr/lib/perl/5.8', | |||
| 73 | archname => 'i486-linux-gnu-thread-multi', | |||
| 74 | cc => 'cc', | |||
| 75 | d_readlink => 'define', | |||
| 76 | d_symlink => 'define', | |||
| 77 | dlsrc => 'dl_dlopen.xs', | |||
| 78 | dont_use_nlink => undef, | |||
| 79 | exe_ext => '', | |||
| 80 | inc_version_list => '5.8.7 5.8.6 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0', | |||
| 81 | intsize => '4', | |||
| 82 | ldlibpthname => 'LD_LIBRARY_PATH', | |||
| 83 | libpth => '/usr/local/lib /lib /usr/lib', | |||
| 84 | osname => 'linux', | |||
| 85 | osvers => '2.6.18.3', | |||
| 86 | path_sep => ':', | |||
| 87 | privlibexp => '/usr/share/perl/5.8', | |||
| 88 | scriptdir => '/usr/bin', | |||
| 89 | sitearchexp => '/usr/local/lib/perl/5.8.8', | |||
| 90 | sitelibexp => '/usr/local/share/perl/5.8.8', | |||
| 91 | useithreads => 'define', | |||
| 92 | usevendorprefix => 'define', | |||
| 93 | version => '5.8.8', | |||
| 94 | }; |