Skip Menu |

This queue is for tickets about the XML-SAX CPAN distribution.

Report information
The Basics
Id: 6224
Status: resolved
Priority: 0/
Queue: XML-SAX

People
Owner: Nobody in particular
Requestors: grantm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.12
Fixed in: (no value)



Subject: A fix for some of the 'cannot find ParserDetails.ini' problems
Makefile.PL asks "Do you want XML::SAX to alter ParserDetails.ini?" even if you don't have one already. So if you answer 'No' then the file won't get created and SAX won't work. The patched Makefile.PL will only ask about modifying the .ini file if it already exists and will quietly create it otherwise. Cheers Grant PS: Matt, did you get this patch when I mailed it on March 15th? I know you're busy, but the last three emails I've sent you have gone unacknowledged.
Index: Makefile.PL =================================================================== RCS file: /home/cvs/XML-SAX/Makefile.PL,v retrieving revision 1.14 diff -u -r1.14 Makefile.PL --- Makefile.PL 2002/01/21 21:44:03 1.14 +++ Makefile.PL 2004/03/15 07:44:32 @@ -1,4 +1,7 @@ use ExtUtils::MakeMaker; +use File::Basename (); +use File::Spec (); + WriteMakefile( 'NAME' => 'XML::SAX', @@ -12,7 +15,29 @@ sub MY::install { package MY; my $script = shift->SUPER::install(@_); - if (ExtUtils::MakeMaker::prompt("Do you want XML::SAX to alter ParserDetails.ini?", "Y") =~ /^y/i) { + + # Only modify existing ParserDetails.ini if user agrees + + my $write_ini_ok = 0; + + eval { require XML::SAX }; + if ($@) { + $write_ini_ok = 1; + } + else { + my $dir = File::Basename::dirname($INC{'XML/SAX.pm'}); + if (-e File::Spec->catfile($dir, 'SAX', 'ParserDetails.ini')) { + $write_ini_ok = + ExtUtils::MakeMaker::prompt( + "Do you want XML::SAX to alter ParserDetails.ini?", "Y" + ) =~ /^y/i; + } + else { + $write_ini_ok = 1; + } + } + + if ($write_ini_ok) { $script =~ s/install :: (.*)$/install :: $1 install_sax_pureperl/m; $script .= <<"INSTALL";
This patch was integrated in the 0.14 release of XML-SAX