perl-xml-sax.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/Makefile.PL 2011-09-04 23:37:48.000000000 +0200
  2. +++ b/Makefile.PL 2011-10-07 18:12:50.000000000 +0200
  3. @@ -12,43 +12,3 @@
  4. 'XML::NamespaceSupport' => 0.03,
  5. },
  6. );
  7. -
  8. -sub MY::install {
  9. - package MY;
  10. - my $script = shift->SUPER::install(@_);
  11. -
  12. - # Only modify existing ParserDetails.ini if user agrees
  13. -
  14. - my $write_ini_ok = 0;
  15. -
  16. - eval { require XML::SAX };
  17. - if ($@) {
  18. - $write_ini_ok = 1;
  19. - }
  20. - else {
  21. - my $dir = File::Basename::dirname($INC{'XML/SAX.pm'});
  22. - if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) {
  23. - $write_ini_ok =
  24. - ExtUtils::MakeMaker::prompt(
  25. - "Do you want XML::SAX to alter ParserDetails.ini?", "Y"
  26. - ) =~ /^y/i;
  27. - }
  28. - else {
  29. - $write_ini_ok = 1;
  30. - }
  31. - }
  32. -
  33. - if ($write_ini_ok) {
  34. - $script =~ s/install :: (.*)$/install :: $1 install_sax_pureperl/m;
  35. - $script .= <<"INSTALL";
  36. -
  37. -install_sax_pureperl :
  38. -\t\@\$(PERL) -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()"
  39. -
  40. -INSTALL
  41. -
  42. - }
  43. -
  44. - return $script;
  45. -}
  46. -