MyInstall.pm 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package MyInstall;
  2. use ExtUtils::Install;
  3. use File::Find;
  4. use vars qw (@ISA @EXPORT @EXPORT_OK);
  5. @ISA = @ExtUtils::Install::ISA;
  6. @EXPORT = @ExtUtils::Install::EXPORT;
  7. @EXPORT_OK = @ExtUtils::Install::EXPORT_OK;
  8. sub ExtUtils::Install::directory_not_empty ($) {
  9. my($dir) = @_;
  10. return 0 if $dir eq 'blib/arch';
  11. my $files = 0;
  12. find(sub {
  13. return if $_ eq ".exists";
  14. if (-f) {
  15. $File::Find::prune++;
  16. $files = 1;
  17. }
  18. }, $dir);
  19. return $files;
  20. }
  21. sub AUTOLOAD
  22. {
  23. print STDERR "AUTOLOAD: $AUTOLOAD\n";
  24. my $name = 'func';
  25. my $code;
  26. my $string = "\$code = \\&ExtUtils::Install::$name";
  27. eval $string;
  28. *$AUTOLOAD = $code;
  29. goto &$AUTOLOAD;
  30. }
  31. 1;