burninate documentation for DOM::Tiny
[catagits/DOM-Tiny.git] / lib / DOM / Tiny / _Collection.pm
index 1046bd7..547946c 100644 (file)
@@ -8,7 +8,7 @@ use Scalar::Util 'blessed';
 
 use constant REDUCE => ($] >= 5.008009 ? \&List::Util::reduce : \&_reduce);
 
-our $VERSION = '0.003';
+our $VERSION = '0.004';
 
 sub new {
   my $class = shift;
@@ -116,12 +116,11 @@ sub _reduce (&@) {
 
   no strict 'refs';
 
-  local(*{$caller."::a"}) = \my $x;
-  local(*{$caller."::b"}) = \my $y;
+  local (*{"${caller}::a"}, *{"${caller}::b"}) = (\my $x, \my $y);
 
   $x = shift;
-  foreach (@_) {
-    $y = $_;
+  foreach my $e (@_) {
+    $y = $e;
     $x = $code->();
   }