Skip Menu |
 

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 58879
Status: rejected
Priority: 0/
Queue: HTML-Tree

People
Owner: Nobody in particular
Requestors: sprout [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.23_1
Fixed in: (no value)



Subject: as_HTML change breaks existing code
Date: Sun, 27 Jun 2010 14:12:43 -0700
To: bug-HTML-Tree [...] rt.cpan.org
From: Father Chrysostomos <sprout [...] cpan.org>
Download (untitled) / with headers
text/plain 508b
HTML-Tree 3.23_1 I agree that it doesn’t make sense for as_HTML to tack "\n" on the end, but I also think it’s too late to change it now. The amount of code using HTML::Tree is huge (see http://deps.cpantesters.org/depended-on-by.pl?dist=HTML-Tree-3.23) and I know that at least some of it breaks with this change. Maybe you could provide an option to omit the "\n". Or perhaps the version number could be increased to 4, and the new behaviour enabled by HTML::Element->new( -api => 4 ) or some such.
Download (untitled) / with headers
text/plain 298b
I'm generally against supporting invalid behaviour, even if it's widely used. You just end up with a mess that makes adding new features impossible. Now I know that sometimes the cost of doing things properly is too high, can you give an examples of the cost of this change being too high to bear?
Subject: Re: [rt.cpan.org #58879] as_HTML change breaks existing code
Date: Sun, 1 Aug 2010 20:22:33 -0700
To: bug-HTML-Tree [...] rt.cpan.org
From: Father Chrysostomos <sprout [...] cpan.org>
Download (untitled) / with headers
text/plain 696b
On Aug 1, 2010, at 8:10 PM, Jeff Fearn via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=58879 > > > I'm generally against supporting invalid behaviour, even if it's widely > used. You just end up with a mess that makes adding new features impossible. > > Now I know that sometimes the cost of doing things properly is too high, > can you give an examples of the cost of this change being too high to bear?
It‘s never going to be too high for *me* to bear. It’s just time-consuming to correct ‘working’ code. I have some code that does chop() on the return value. Since HTML::Tree is so widely used, I can’t imagine I’m the only one. Then again, maybe I am. :-)
Download (untitled) / with headers
text/plain 1.2k
On Mon Aug 02 13:22:43 2010, sprout@cpan.org wrote: Show quoted text
> > On Aug 1, 2010, at 8:10 PM, Jeff Fearn via RT wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=58879 > > > > > I'm generally against supporting invalid behaviour, even if it's
> widely
> > used. You just end up with a mess that makes adding new features
> impossible.
> > > > Now I know that sometimes the cost of doing things properly is too
> high,
> > can you give an examples of the cost of this change being too high
> to bear? > > It‘s never going to be too high for *me* to bear. It’s just time- > consuming to correct ‘working’ code. > > I have some code that does chop() on the return value. Since > HTML::Tree is so widely used, I can’t imagine I’m the only one. Then > again, maybe I am. :-) >
This change was in response to a bug opened because adding a new line is invalid behaviour. While it may affect some use cases I think the original bug is correct and this behaviour should be changed to not output a spurious new line. You have the chop there because it's wrong to add the new line, so ironically enough this fix is only likely to affect people who have worked this issue in their own code :/ Here's hoping most of them used chomp instead of chop :) Cheers, Jeff.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.