On Sun Oct 23 17:33:19 2011, schwern@pobox.com wrote:
Show quoted text> On 2011.10.23 12:41 PM, Father Chrysostomos via RT wrote:
> > We can fix it. That’s what. :-)
> >
> > That second version still escapes $(ECHO).
> >
> > s~<(AUTHOR|ABSTRACT)>(.*?)</\1>~
> > my($tag,$tmp) = ($1,$2);
> > $tmp =~ s/((?>[^\$]*(?:\$\$[^\$]*)*))\$/$1\$\$/g;
> > "<$tag>$tmp</$tag>";
> > ~e for @ppd_cmds;
>
> I appreciate the try... that's, uhh... quite the impressive bit of
> regex
> magic.
I just wanted to have a bit of fun on a Sunday afternoon. :-)
Show quoted text> I like how you used ~ instead of {} for delimiters to maximize
> confusion. :P But it can't be used, sorry. MakeMaker is trying to
> move away
> from hacking already formatted content. Makes it far easier to
> understand and
> debug and generally cause less headaches.
>
> I think echo() should be changed to escape everything. That would
> match its
> existing uses, outputting PPD and the META files, and a safer default.
> Looking at how it's used in the wild, that would seem to be what
> everyone else
> expects (if they're thinking about escapes at all... which they're
> not). [1]
>
ppd has other problems, too. It does s/\n/\\n/, which can’t be right. It does not escape &.
The fix that has been applied is already sufficient for my purposes (see
http://perl5.git.perl.org/perl.git/blob/b82b06b8ca:/ext/arybase/Makefile.PL, which can be
deleted when EUMM is updated), so I think I’ll let this wait till another day.
BTW, while I have your attention, have you seen <
https://rt.cpan.org/Ticket/Display.html?
id=67538>?