1:
2:
3:
4: package Config;
5: use strict;
6:
7:
8: @Config::EXPORT = qw(%Config);
9: @Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re);
10:
11:
12:
13:
14: sub myconfig;
15: sub config_sh;
16: sub config_vars;
17: sub config_re;
18:
19: my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
20:
21: our %Config;
22:
23:
24: sub import {
25: my $pkg = shift;
26: @_ = @Config::EXPORT unless @_;
27:
28: my @funcs = grep $_ ne '%Config', @_;
29: my $export_Config = @funcs < @_ ? 1 : 0;
30:
31: no strict 'refs';
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:
43: die "Perl lib version (v5.8.9) doesn't match executable version ($])"
44: unless $^V;
45:
46: $^V eq v5.8.9
47: or die "Perl lib version (v5.8.9) doesn't match executable version (" .
48: sprintf("v%vd",$^V) . ")";
49:
50:
51: sub FETCH {
52: my($self, $key) = @_;
53:
54:
55: return $self->{$key} if exists $self->{$key};
56:
57: return $self->fetch_string($key);
58: }
59: sub TIEHASH {
60: bless $_[1], $_[0];
61: }
62:
63: sub DESTROY { }
64:
65: sub AUTOLOAD {
66: require 'Config_heavy.pl';
67: goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
68: die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
69: }
70:
71:
72: tie %Config, 'Config', {
73: archlibexp => '/usr/local/perl/5.8/lib/perl5/5.8/mach',
74: archname => 'amd64-freebsd',
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 => 'freebsd',
86: osvers => '13.0-release-p6',
87: path_sep => ':',
88: privlibexp => '/usr/local/perl/5.8/lib/perl5/5.8',
89: scriptdir => '/usr/local/perl/5.8/bin',
90: sitearchexp => '/usr/local/perl/5.8/lib/perl5/site_perl/5.8/mach',
91: sitelibexp => '/usr/local/perl/5.8/lib/perl5/site_perl/5.8',
92: useithreads => undef,
93: usevendorprefix => undef,
94: version => '5.8.9',
95: };