← Index
NYTProf Performance Profile   « block view • line view • sub view »
For ddd2.pl
  Run on Tue May 25 16:52:24 2010
Reported on Tue May 25 16:56:56 2010

File /usr/local/lib/perl5/5.8.8/i686-linux/Config.pm
Statements Executed 52
Statement Execution Time 1.65ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
333209µs209µsConfig::::importConfig::import
763149µs149µsConfig::::FETCHConfig::FETCH
0000s0sConfig::::AUTOLOADConfig::AUTOLOAD
0000s0sConfig::::BEGINConfig::BEGIN
0000s0sConfig::::DESTROYConfig::DESTROY
0000s0sConfig::::TIEHASHConfig::TIEHASH
Call graph for these subroutines as a Graphviz dot language file.
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
4package Config;
53314µs125µsuse strict;
# spent 25µs making 1 call to strict::import
6# use warnings; Pulls in Carp
7# use vars pulls in Carp
818µs@Config::EXPORT = qw(%Config);
917µ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
19117µsmy %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
20
2115µsour %Config;
22
23# Define our own import method to avoid pulling in the full Exporter:
24
# spent 209µs within Config::import which was called 3 times, avg 70µs/call: # once (73µs+0s) by LWP::Protocol::implementor at line 8 of Errno.pm # once (72µs+0s) by base::import at line 25 of DynaLoader.pm # once (64µs+0s) by Class::DBI::_require_class at line 5 of Time/Local.pm
sub import {
2524243µs my $pkg = shift;
26 @_ = @Config::EXPORT unless @_;
27
28 my @funcs = grep $_ ne '%Config', @_;
29 my $export_Config = @funcs < @_ ? 1 : 0;
30
313732µs1120µs no strict 'refs';
# spent 120µ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
4315µsdie "Perl lib version (v5.8.8) doesn't match executable version ($])"
44 unless $^V;
45
46114µs$^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
51
# spent 149µs within Config::FETCH which was called 7 times, avg 21µs/call: # 2 times (44µs+0s) by LWP::Protocol::implementor at line 11 of Errno.pm, avg 22µs/call # once (26µs+0s) by base::import at line 80 of DynaLoader.pm # once (26µs+0s) by Class::DBI::_require_class at line 34 of Time/Local.pm # once (18µs+0s) by base::import at line 85 of DynaLoader.pm # once (18µs+0s) by base::import at line 83 of DynaLoader.pm # once (17µs+0s) by base::import at line 84 of DynaLoader.pm
sub FETCH {
5214197µs my($self, $key) = @_;
53
54 # check for cached value (which may be undef so we use exists not defined)
55 return $self->{$key} if exists $self->{$key};
56
57 return $self->fetch_string($key);
58}
59sub TIEHASH {
60126µs bless $_[1], $_[0];
61}
62
63sub DESTROY { }
64
65sub AUTOLOAD {
66 require 'Config_heavy.pl';
67 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
68 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
69}
70
71# tie returns the object, so the value returned to require will be true.
72177µstie %Config, 'Config', {
73 archlibexp => '/usr/local/lib/perl5/5.8.8/i686-linux',
74 archname => 'i686-linux',
75 cc => 'cc',
76 d_readlink => 'define',
77 d_symlink => 'define',
78 dlsrc => 'dl_dlopen.xs',
79 dont_use_nlink => undef,
80 exe_ext => '',
81 inc_version_list => ' ',
82 intsize => '4',
83 ldlibpthname => 'LD_LIBRARY_PATH',
84 libpth => '/usr/local/lib /lib /usr/lib',
85 osname => 'linux',
86 osvers => '2.6.9-42.0.10.el',
87 path_sep => ':',
88 privlibexp => '/usr/local/lib/perl5/5.8.8',
89 scriptdir => '/usr/local/bin',
90 sitearchexp => '/usr/local/lib/perl5/site_perl/5.8.8/i686-linux',
91 sitelibexp => '/usr/local/lib/perl5/site_perl/5.8.8',
92 useithreads => undef,
93 usevendorprefix => undef,
94 version => '5.8.8',
95};