Subject: | Method calls pass the object as the first parameter |
Includes patch from previous bug -- posted too early before looking at
the second method.
Two of two methods broken.
SelectorList.pm
--- SelectorList.pm.orig 2008-08-03 15:38:10.000000000 -0700
+++ SelectorList.pm 2008-08-03 15:47:47.000000000 -0700
@@ -46,7 +46,7 @@
# returns the length of the list
#---------------------------------------------------------------------#
sub Length {
- return scalar @$_[0];
+ return scalar @{$_[0]};
}
#---------------------------------------------------------------------#
*CSS::SAC::SelectorList::getLength = \&Length;
@@ -56,7 +56,7 @@
# get/set the item at that position
#---------------------------------------------------------------------#
sub Item {
- (@_ == 2) ? $_[0]->[$_[1]] = $_[2] :
+ (@_ == 3) ? $_[0]->[$_[1]] = $_[2] :
$_[0]->[$_[1]];
}
#---------------------------------------------------------------------#