On Mon Jul 24 13:20:24 2006, twists@gmail.com wrote:
Show quoted text> On 7/24/06, adam@phase-n.com via RT <bug-PPI@rt.cpan.org> wrote:
>
> Ah. Perl::Critic was using the overloaded "" stringification which
> triggered this. I saw the same behavior in PPI and figured it was
> PPI's problem. I didn't realize the overloaded "" was producing wrong
> output just because it wasn't named ->serialize.
>
> Is there a good reason to overload "" to ->content()? I'd think it'd
> be more correct to overload to ->serialize().
>
> Josh
When treated as a simple string, you can't fully serialize validly.
You can ONLY do it when you fully output to a file (due to the nature of
the way here-doc content works).
So for the moment, no I'm keeping it as content, mostly because if I
change it to serialize, it means that a document stringifies differently
to an element. And I'm dubious about that.