| 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 | | | | | use strict; |
| 10 | | | | | use warnings; |
| 11 | | | | | use vars '%Config', '$VERSION'; |
| 12 | | | | | |
| 13 | | | | | $VERSION = "5.020002"; |
| 14 | | | | | |
| 15 | | | | | # Skip @Config::EXPORT because it only contains %Config, which we special |
| 16 | | | | | # case below as it's not a function. @Config::EXPORT won't change in the |
| 17 | | | | | # lifetime of Perl 5. |
| 18 | | | | | my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1, |
| 19 | | | | | config_re => 1, compile_date => 1, local_patches => 1, |
| 20 | | | | | bincompat_options => 1, non_bincompat_options => 1, |
| 21 | | | | | header_files => 1); |
| 22 | | | | | |
| 23 | | | | | @Config::EXPORT = qw(%Config); |
| 24 | | | | | @Config::EXPORT_OK = keys %Export_Cache; |
| 25 | | | | | |
| 26 | | | | | # Need to stub all the functions to make code such as print Config::config_sh |
| 27 | | | | | # keep working |
| 28 | | | | | |
| 29 | | | | | sub bincompat_options; |
| 30 | | | | | sub compile_date; |
| 31 | | | | | sub config_re; |
| 32 | | | | | sub config_sh; |
| 33 | | | | | sub config_vars; |
| 34 | | | | | sub header_files; |
| 35 | | | | | sub local_patches; |
| 36 | | | | | sub myconfig; |
| 37 | | | | | sub non_bincompat_options; |
| 38 | | | | | |
| 39 | | | | | # Define our own import method to avoid pulling in the full Exporter: |
| 40 | | | | | sub import { |
| 41 | | | | | shift; |
| 42 | | | | | @_ = @Config::EXPORT unless @_; |
| 43 | | | | | |
| 44 | | | | | my @funcs = grep $_ ne '%Config', @_; |
| 45 | | | | | my $export_Config = @funcs < @_ ? 1 : 0; |
| 46 | | | | | |
| 47 | | | | | no strict 'refs'; |
| 48 | | | | | my $callpkg = caller(0); |
| 49 | | | | | foreach my $func (@funcs) { |
| 50 | | | | | die qq{"$func" is not exported by the Config module\n} |
| 51 | | | | | unless $Export_Cache{$func}; |
| 52 | | | | | *{$callpkg.'::'.$func} = \&{$func}; |
| 53 | | | | | } |
| 54 | | | | | |
| 55 | | | | | *{"$callpkg\::Config"} = \%Config if $export_Config; |
| 56 | | | | | return; |
| 57 | | | | | } |
| 58 | | | | | |
| 59 | | | | | die "$0: Perl lib version (5.20.2) doesn't match executable '$^X' version ($])" |
| 60 | | | | | unless $^V; |
| 61 | | | | | |
| 62 | | | | | $^V eq 5.20.2 |
| 63 | | | | | or die sprintf "%s: Perl lib version (5.20.2) doesn't match executable '$^X' version (%vd)", $0, $^V; |
| 64 | | | | | |
| 65 | | | | | sub FETCH { |
| 66 | | | | | my($self, $key) = @_; |
| 67 | | | | | |
| 68 | | | | | # check for cached value (which may be undef so we use exists not defined) |
| 69 | 1 | 171µs | | | return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); |
| 70 | | | | | } |
| 71 | | | | | |
| 72 | | | | | sub TIEHASH { |
| 73 | | | | | bless $_[1], $_[0]; |
| 74 | | | | | } |
| 75 | | | | | |
| 76 | | | | | sub DESTROY { } |
| 77 | | | | | |
| 78 | | | | | sub AUTOLOAD { |
| 79 | 1 | 6µs | | | require 'Config_heavy.pl'; |
| 80 | | | | | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; |
| 81 | | | | | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; |
| 82 | | | | | } |
| 83 | | | | | |
| 84 | | | | | # tie returns the object, so the value returned to require will be true. |
| 85 | | | | | tie %Config, 'Config', { |
| 86 | | | | | archlibexp => '/usr/lib/x86_64-linux-gnu/perl/5.20', |
| 87 | | | | | archname => 'x86_64-linux-gnu-thread-multi', |
| 88 | | | | | cc => 'cc', |
| 89 | | | | | d_readlink => 'define', |
| 90 | | | | | d_symlink => 'define', |
| 91 | | | | | dlext => 'so', |
| 92 | | | | | dlsrc => 'dl_dlopen.xs', |
| 93 | | | | | dont_use_nlink => undef, |
| 94 | | | | | exe_ext => '', |
| 95 | | | | | inc_version_list => '5.20.1 5.20.0', |
| 96 | | | | | intsize => '4', |
| 97 | | | | | ldlibpthname => 'LD_LIBRARY_PATH', |
| 98 | | | | | libpth => '/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib', |
| 99 | | | | | osname => 'linux', |
| 100 | | | | | osvers => '3.2.0-4-amd64', |
| 101 | | | | | path_sep => ':', |
| 102 | | | | | privlibexp => '/usr/share/perl/5.20', |
| 103 | | | | | scriptdir => '/usr/bin', |
| 104 | | | | | sitearchexp => '/usr/local/lib/x86_64-linux-gnu/perl/5.20.2', |
| 105 | | | | | sitelibexp => '/usr/local/share/perl/5.20.2', |
| 106 | | | | | so => 'so', |
| 107 | | | | | useithreads => 'define', |
| 108 | | | | | usevendorprefix => 'define', |
| 109 | | | | | version => '5.20.2', |
| 110 | | | | | }; |