Skip Menu |

This queue is for tickets about the ExtUtils-ModuleMaker CPAN distribution.

Report information
The Basics
Id: 2906
Status: resolved
Priority: 0/
Queue: ExtUtils-ModuleMaker

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



Subject: if ABSTRACT => "bla'h", Makefile.PL has 'bla'h'
if ABSTRACT => "bla'h", Makefile.PL has 'bla'h' which is a syntaxt error
Here is a patch (it's for sub FileText_Makefile), go on, fix fix ;) sub FileText_Makefile { my ($self) = @_; # my $extras = join ("\n", # map { " $_ => '$self-> {EXTRAMAKE}{$_}'," } # keys %{$self->{EXTRAMAKE}} # ) if ((exists $self-> {EXTRAMAKE}) && # (ref ($self-> {EXTRAMAKE}) eq 'hash')); my $page = sprintf q~ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => '%s', VERSION_FROM => '%s', # finds \$VERSION AUTHOR => '%s (%s)', ABSTRACT => '%s', PREREQ_PM => { 'Test::Simple' => 0.44, }, ); ~, map { s{'}{\\'}g; $_ } $self->{NAME}, $self->{FILE}, ( $self->{AUTHOR}{NAME} ) x 2, $self->{ABSTRACT}; # ($] ge '5.005') # ? (AUTHOR => '$self->{AUTHOR}{NAME} ($self->{AUTHOR} {EMAIL})', # ABSTRACT => '$self->{ABSTRACT}', # ) # : (), return ($page); }
Better make that map line map { my $s = $_; $s =~ s{'}{\\'}g; $s; } lest you wish to modify your object
From: JKEENAN
[guest - Tue Jul 22 16:11:56 2003]: Show quoted text
> Better make that map line > > map { my $s = $_; $s =~ s{'}{\\'}g; $s; } > > lest you wish to modify your object
This bug fix will be incorporated into an upcoming version of ExtUtils::ModuleMaker. Thanks.
I've taken over maintenance of EU::MM from Geoff Avery. I'm going to mark this bug as Resolved even though it's not completely fixed. But the amount of time/work that would be necessary to fix it is probably better spent elsewhere. I've added the following to the documentation (see v0.36): "If the abstract contains an apostrophe (C<'>), then the value corresponding to key C<ABSTRACT> in the list passed to the constructor must be double-quoted; otherwise F<Makefile.PL> gets messed up." The difficulty in fixing this is that it has to work in several different situations: calling EU:: MM from a script, using the modulemaker utility in interactive mode and using the utility in non-interactive mode (pure command-line). There are several other points where using apostrophes can get you into trouble. Asking people either to avoid them or to double-quote them doesn't seem like too much too ask, particularly since quoting problems are not limited to this module.