Skip Menu |

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

Report information
The Basics
Id: 17620
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: HTML-Element-Library

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

Bug Information
Severity: Important
Broken in: 3.1
Fixed in: (no value)



Subject: element attributes in a different order for tests
The attached file is the test run I tried. You'll note that the only failures related to specific string matching where the attributes are in a different order to those expected. The results are still valid and correct. I suggest you use some other method for validating whether the return values match what is expected. I assume somewhere in the mix there is a hash storing the elements/attributes, which you are expecting to always return data in a guaranteed order. Also could you include 'Params::Validate' and 'HTML::Element' in your Makefile.PL as these are missing from your prerequisites.
Subject: audit.log
Download audit.log
application/octet-stream 58.8k

Message body not shown because it is not plain text.

CC: barbie [...] missbarbell.co.uk
Subject: Re: [rt.cpan.org #17620] element attributes in a different order for tests
Date: Mon, 13 Feb 2006 11:14:09 -0800
To: bug-HTML-Element-Library [...] rt.cpan.org
From: Terrence Brannon <metaperl [...] gmail.com>
On 2/13/06, Barbie via RT <bug-HTML-Element-Library@rt.cpan.org> wrote: Show quoted text
> > The attached file is the test run I tried. You'll note that the only > failures related to specific string matching where the attributes are in > a different order to those expected. The results are still valid and > correct. I suggest you use some other method for validating whether the > return values match what is expected. I assume somewhere in the mix > there is a hash storing the elements/attributes, which you are expecting > to always return data in a guaranteed order.
Yes, in the svn trunk of HTML::Tree, the file HTML/Element.pm has a subroutine starttag() which builds the start tag and its attributes. On line 1858 of that subroutine you see this: for (sort keys %$self) { # predictable ordering and that forces the attributes to be in sorted order. It looks like my expectation file (*.exp) in the test suite is out of date. I just updated that file so that the attributes are in sorted order. The attached .tar.gz is going to CPAN now and should address the issue. I credited you in the AUTHOR section. Show quoted text
> > Also could you include 'Params::Validate' and 'HTML::Element' in your > Makefile.PL as these are missing from your prerequisites.
Thanks. I added Params::Validate. HTML::Element is part of the HTML::Tree distribution which is already included.

Message body not shown because it is not plain text.

Ok everything should be hunky-dory now.