Skip Menu |

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

Report information
The Basics
Id: 34904
Status: rejected
Worked: 1 min
Priority: 0/
Queue: XML-Tiny

People
Owner: dcantrell [...] cpan.org
Requestors: polettix [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.11
Fixed in: (no value)



Subject: Semantic error when embedding at the end of a script
If you embed the module into a script like this: # first your script ... # then XML::Tiny module package XML::Tiny; ... you'll get a semantic error due to the fact that the %regexps variable is not initialised. I'd suggest this little change, from the current my %regexps = ( name => '[:a-z][\\w:\\.-]*' ); to my %regexps; BEGIN { %regexps = ( name => '[:a-z][\\w:\\.-]*' ); } The other "global" variable $strict_entity_parsing shouldn't suffer from this problem.
This is not a bug. You're not supposed to use modules like that.
Subject: Re: [rt.cpan.org #34904] Semantic error when embedding at the end of a script
Date: Sat, 19 Apr 2008 21:10:49 +0200 (CEST)
To: bug-XML-Tiny [...] rt.cpan.org
From: "Flavio Poletti" <flavio [...] polettix.it>
IMHO one of the strengths of these ::Tiny modules is the fact that they are easy to carry around, which could mean embedding them inside the scripts. I see no harm in using XML::Tiny in this way once the bug-no-bug is worked around, but I'm probably overlooking something. Can you elaborate or point me to some discussion about why (these) modules shouldn't be used like that? Cheers, Flavio. Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=34904 > > > This is not a bug. You're not supposed to use modules like that. > >
If you embed the module in your script, then you're not going to be able to easily take advantage of any other bug fixes in the future and will have to maintain it by hand, so you might as well fix this locally anyway.
Subject: Re: [rt.cpan.org #34904] Semantic error when embedding at the end of a script
Date: Thu, 15 May 2008 09:45:31 +0200 (CEST)
To: bug-XML-Tiny [...] rt.cpan.org
From: "Flavio Poletti" <flavio [...] polettix.it>
The original patch allows a user to get the module, embed it inside a script and just use it. Your reasoning implies that the same user must know how the module works internally and tweak it before using it. Between the two alternatives, I'd prefer the former, but evidently it's just me and the latter is better in ways that are well beyond my understanding capacity. Anyway, yours the module and yours the decision, so I'll step back. Please believe me that I was only trying to help making the module a little better (from my POV, of course), not doing useless criticism. Cheers, Flavio. Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=34904 > > > If you embed the module in your script, then you're not going to be able > to easily take > advantage of any other bug fixes in the future and will have to maintain > it by hand, so you > might as well fix this locally anyway. >
Rejecting the ticket as originally intended by the module's author.