develooper Front page | perl.perl5.porters | Postings from May 2008

Re: [patch] MAD Dumper - missing encoding of XML-unsafe literals in "pre"

Thread Previous | Thread Next
From:
Rick Delaney
Date:
May 4, 2008 09:45
Subject:
Re: [patch] MAD Dumper - missing encoding of XML-unsafe literals in "pre"
On May 04 2008, Rafael Garcia-Suarez wrote:
> 2008/5/3 Jesse Vincent <jesse@fsck.com>:
> > As I've been playing around with MAD this morning, I discovered a small
> > issue with the way it does some of its xml dumping. The attached patch to
> > dump.c improves this to use the entity encoder which was sitting there
> > crying out for more attention.
> >
> >  This is my first C patch to the core, so I'm sure I've done something
> > not-quite-right.
> 
> Yes :)
> 
> You've patched against 5.10.0. The regexp structures have
> significantly changed since 5.10, thanks to Nicholas -- they're now
> first class. So that's one of the reasons why your patch doesn't
> apply.

Which is saying to try to patch against bleadperl.  Try `perldoc perlhack`
to see how to get an up-to-date copy of the perl source.

Is anyone planning to update perlhack.pod to include git commands?

> The second one is that Gerard already fixed that bug, by this change :
> 
> Change 33584 by rgs@stcosmo on 2008/03/27 14:42:41
> 
> 	Subject: [PATCH] MAD dump xml escape regex
> 	From: Gerard Goossen <gerard@tty.nl>
> 	Date: Thu, 27 Mar 2008 13:55:31 +0100
> 	Message-ID: <20080327125531.GN4409@ostwald>
> 
> The third one is that your patch probably leaks a scalar (the 2nd newSVpvn()).

So you should wrap it in sv_2mortal.

-- 
Rick Delaney
rick@bort.ca

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About