Bug in HTML::Element::all_external_attr()
Claus Schotten (schotten@gmx.de)
Tue, 8 Aug 2000 10:57:28 +0200 (MEST)
Hi,
I found a bug in HTML::Element::all_external_attr().
According to the documentation it should return a list
(name1, value1, name2, vlaue2,...) of attribute-value pairs.
It currently returns a list of the attribute values only.
The attribute names are missing.
The patch at the end of the mail will fix it.
BTW:
A function that returns the attribute names only, would be very usefull.
In most applications you will handle attribute names and values
differently anyway. And it is IMO a lot easier to fetch the attribute
value to a given name using $e->attr($name) than separating names and
values from the joined list returned by all_external_attr().
Ciao, Claus schotten@gmx.de
------ snip -------------------------------------------------------------
--- Element.pm.sav Mon Jun 12 10:07:50 2000
+++ Element.pm Sun Aug 6 16:54:50 2000
@@ -560,3 +560,3 @@
map(
- (length($_) && substr($_,0,1) eq '_') ? () : ($self->{$_}),
+ (length($_) && substr($_,0,1) eq '_') ? () : ($_,$self->{$_}),
keys %$self
------ snip -------------------------------------------------------------
--
Sent through GMX FreeMail - http://www.gmx.net