home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _31a8edafec624d4263fa2c93475a933e < prev    next >
Text File  |  2004-06-01  |  703b  |  32 lines

  1. package Memoize::AnyDBM_File;
  2.  
  3. =head1 NAME
  4.  
  5. Memoize::AnyDBM_File - glue to provide EXISTS for AnyDBM_File for Storable use
  6.  
  7. =head1 DESCRIPTION
  8.  
  9. See L<Memoize>.
  10.  
  11. =cut
  12.  
  13. use vars qw(@ISA $VERSION);
  14. $VERSION = 0.65;
  15. @ISA = qw(DB_File GDBM_File Memoize::NDBM_File Memoize::SDBM_File ODBM_File) unless @ISA;
  16.  
  17. my $verbose = 1;
  18.  
  19. my $mod;
  20. for $mod (@ISA) {
  21. #  (my $truemod = $mod) =~ s/^Memoize:://;
  22. #  my $file = "$mod.pm";
  23. #  $file =~ s{::}{/}g;
  24.   if (eval "require $mod") {
  25.     print STDERR "AnyDBM_File => Selected $mod.\n" if $Verbose;
  26.     @ISA = ($mod);    # if we leave @ISA alone, warnings abound
  27.     return 1;
  28.   }
  29. }
  30.  
  31. die "No DBM package was successfully found or installed";
  32.