← Index
Performance Profile   « block view • line view • sub view »
For t/test-parsing
  Run on Sun Nov 14 09:49:57 2010
Reported on Sun Nov 14 09:50:06 2010

File /usr/lib/perl/5.10/Config.pm
Statements Executed 30
Total Time 0.0006989 seconds
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
44130µs30µsConfig::::FETCHConfig::FETCH
11127µs27µsConfig::::importConfig::import
0000s0sConfig::::AUTOLOADConfig::AUTOLOAD
0000s0sConfig::::BEGINConfig::BEGIN
0000s0sConfig::::DESTROYConfig::DESTROY
0000s0sConfig::::TIEHASHConfig::TIEHASH
LineStmts.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
4package Config;
53175µs58µsuse strict;
# spent 12µs making 1 call to strict::import
6# use warnings; Pulls in Carp
7# use vars pulls in Carp
812µs2µs@Config::EXPORT = qw(%Config);
911µs1µs@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
14sub myconfig;
15sub config_sh;
16sub config_vars;
17sub config_re;
18
19113µs13µsmy %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
20
211200ns200nsour %Config;
22
23# Define our own import method to avoid pulling in the full Exporter:
24
# spent 27µs within Config::import which was called # once (27µs+0s) by DynaLoader::BEGIN at line 24 of /usr/lib/perl/5.10/DynaLoader.pm
sub import {
25820µs3µs my $pkg = shift;
26 @_ = @Config::EXPORT unless @_;
27
28 my @funcs = grep $_ ne '%Config', @_;
29 my $export_Config = @funcs < @_ ? 1 : 0;
30
313408µs136µs no strict 'refs';
# spent 26µs making 1 call to strict::unimport
32 my $callpkg = caller(0);
33 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 *{"$callpkg\::Config"} = \%Config if $export_Config;
40 return;
41}
42
4319µs9µsdie "Perl lib version (5.10.0) doesn't match executable version ($])"
44 unless $^V;
45
4618µs8µs$^V eq 5.10.0
47 or die "Perl lib version (5.10.0) doesn't match executable version (" .
48 sprintf("v%vd",$^V) . ")";
49
50
# spent 30µs within Config::FETCH which was called 4 times, avg 7µs/call: # once (9µs+0s) at line 64 of /usr/lib/perl/5.10/DynaLoader.pm # once (9µs+0s) at line 66 of /usr/lib/perl/5.10/DynaLoader.pm # once (6µs+0s) at line 67 of /usr/lib/perl/5.10/DynaLoader.pm # once (5µs+0s) at line 68 of /usr/lib/perl/5.10/DynaLoader.pm
sub FETCH {
51814µs2µs my($self, $key) = @_;
52
53 # check for cached value (which may be undef so we use exists not defined)
54 return $self->{$key} if exists $self->{$key};
55
56 return $self->fetch_string($key);
57}
58sub TIEHASH {
5915µs5µs bless $_[1], $_[0];
60}
61
62sub DESTROY { }
63
64sub 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.
71144µs44µstie %Config, 'Config', {
72 archlibexp => '/usr/lib/perl/5.10',
73 archname => 'x86_64-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 => '',
81 intsize => '4',
82 ldlibpthname => 'LD_LIBRARY_PATH',
83 libpth => '/usr/local/lib /lib /usr/lib /lib64 /usr/lib64',
84 osname => 'linux',
85 osvers => '2.6.30.5-dsa-amd64',
86 path_sep => ':',
87 privlibexp => '/usr/share/perl/5.10',
88 scriptdir => '/usr/bin',
89 sitearchexp => '/usr/local/lib/perl/5.10.0',
90 sitelibexp => '/usr/local/share/perl/5.10.0',
91 useithreads => 'define',
92 usevendorprefix => 'define',
93 version => '5.10.0',
94};