more cleanup of legacy reduce function
Dan Book [Mon, 21 Mar 2016 23:11:59 +0000 (19:11 -0400)]
META.json
Makefile.PL
lib/DOM/Tiny/Entities.pm
lib/DOM/Tiny/_Collection.pm

index bc6c646..331a418 100644 (file)
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Dan Book <dbook@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150001",
+   "generated_by" : "Dist::Zilla version 5.043, CPAN::Meta::Converter version 2.150005",
    "license" : [
       "artistic_2"
    ],
    "provides" : {
       "DOM::Tiny" : {
          "file" : "lib/DOM/Tiny.pm",
-         "version" : "0.003"
+         "version" : "0.004"
       },
       "DOM::Tiny::Entities" : {
          "file" : "lib/DOM/Tiny/Entities.pm",
-         "version" : "0.003"
+         "version" : "0.004"
       }
    },
    "release_status" : "stable",
          "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/DOM-Tiny.git"
       }
    },
-   "version" : "0.003",
+   "version" : "0.004",
    "x_contributors" : [
-      "Dan Book <grinnz@grinnz.com>"
+      "Dan Book <grinnz@grinnz.com>",
+      "Matt S Trout <mst@shadowcat.co.uk>"
    ]
 }
 
index dd69f3d..86a2247 100644 (file)
@@ -27,7 +27,7 @@ my %WriteMakefileArgs = (
     "JSON::PP" => 0,
     "Test::More" => "0.88"
   },
-  "VERSION" => "0.003",
+  "VERSION" => "0.004",
   "test" => {
     "TESTS" => "t/*.t"
   }
index 2ed8d70..0d442f5 100644 (file)
@@ -86,7 +86,7 @@ Escape unsafe characters C<&>, C<< < >>, C<< > >>, C<">, and C<'> in string.
 Unescape all HTML entities in string, according to the
 L<HTML Living Standard|https://html.spec.whatwg.org/#named-character-references-table>.
 
- html_unescape '&lt;div&gt; # "<div>"
+ html_unescape '&lt;div&gt'; # "<div>"
 
 =head1 BUGS
 
index da649dd..547946c 100644 (file)
@@ -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->();
   }