home *** CD-ROM | disk | FTP | other *** search
/ Freelog 112 / FreelogNo112-NovembreDecembre2012.iso / Graphisme / XnViewMP / XnViewMP.exe / lib / Config.pm < prev    next >
Text File  |  2011-08-27  |  3KB  |  107 lines

  1. #line 1 "Config.pm"
  2. # This file was created by configpm when Perl was built. Any changes
  3. # made to this file will be lost the next time perl is built.
  4.  
  5. package Config;
  6. use strict;
  7. # use warnings; Pulls in Carp
  8. # use vars pulls in Carp
  9. @Config::EXPORT = qw(%Config);
  10. @Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re);
  11.  
  12. # Need to stub all the functions to make code such as print Config::config_sh
  13. # keep working
  14.  
  15. sub myconfig;
  16. sub config_sh;
  17. sub config_vars;
  18. sub config_re;
  19.  
  20. my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
  21.  
  22. our %Config;
  23.  
  24. # Define our own import method to avoid pulling in the full Exporter:
  25. sub import {
  26.     my $pkg = shift;
  27.     @_ = @Config::EXPORT unless @_;
  28.  
  29.     my @funcs = grep $_ ne '%Config', @_;
  30.     my $export_Config = @funcs < @_ ? 1 : 0;
  31.  
  32.     no strict 'refs';
  33.     my $callpkg = caller(0);
  34.     foreach my $func (@funcs) {
  35.     die sprintf qq{"%s" is not exported by the %s module\n},
  36.         $func, __PACKAGE__ unless $Export_Cache{$func};
  37.     *{$callpkg.'::'.$func} = \&{$func};
  38.     }
  39.  
  40.     *{"$callpkg\::Config"} = \%Config if $export_Config;
  41.     return;
  42. }
  43.  
  44. die "Perl lib version (v5.8.7) doesn't match executable version ($])"
  45.     unless $^V;
  46.  
  47. $^V eq v5.8.7
  48.     or die "Perl lib version (v5.8.7) doesn't match executable version (" .
  49.     sprintf("v%vd",$^V) . ")";
  50.  
  51.  
  52. sub FETCH {
  53.     my($self, $key) = @_;
  54.  
  55.     # check for cached value (which may be undef so we use exists not defined)
  56.     return $self->{$key} if exists $self->{$key};
  57.  
  58.     return $self->fetch_string($key);
  59. }
  60. sub TIEHASH {
  61.     bless $_[1], $_[0];
  62. }
  63.  
  64. sub DESTROY { }
  65.  
  66. sub AUTOLOAD {
  67.     my $config_heavy = 'Config_heavy.pl';
  68.     if (defined &ActivePerl::_CONFIG_HEAVY) {
  69.        $config_heavy = ActivePerl::_CONFIG_HEAVY();
  70.     }
  71.     require $config_heavy;
  72.     goto \&launcher;
  73.     die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
  74. }
  75.  
  76. sub __unused {
  77.     # XXX Keep PerlApp happy
  78.     require 'Config_heavy.pl';
  79. }
  80.  
  81. tie %Config, 'Config', {
  82.     archlibexp => 'c:\\Perl\\lib',
  83.     archname => 'MSWin32-x86-multi-thread',
  84.     d_readlink => undef,
  85.     d_symlink => undef,
  86.     dlsrc => 'dl_win32.xs',
  87.     dont_use_nlink => undef,
  88.     exe_ext => '.exe',
  89.     inc_version_list => '',
  90.     intsize => '4',
  91.     ldlibpthname => '',
  92.     lib_ext => '.lib',
  93.     osname => 'MSWin32',
  94.     osvers => '5.0',
  95.     path_sep => ';',
  96.     privlibexp => 'c:\\Perl\\lib',
  97.     scriptdir => 'c:\\Perl\\bin',
  98.     sitearchexp => 'c:\\Perl\\site\\lib',
  99.     sitelibexp => 'c:\\Perl\\site\\lib',
  100.     so => 'dll',
  101.     useithreads => 'define',
  102.     usevendorprefix => undef,
  103.     version => '5.8.7',
  104. };
  105.  
  106. 1;
  107.