Upgrade to Test::Harness 3.14
[p5sagit/p5-mst-13.2.git] / ext / Test / Harness / lib / TAP / Parser / Result.pm
index eb27a19..486c6ff 100644 (file)
@@ -26,11 +26,11 @@ TAP::Parser::Result - Base class for TAP::Parser output objects
 
 =head1 VERSION
 
-Version 3.13
+Version 3.14
 
 =cut
 
-$VERSION = '3.13';
+$VERSION = '3.14';
 
 =head1 SYNOPSIS
 
@@ -68,8 +68,10 @@ sub _initialize {
     my ( $self, $token ) = @_;
     if ($token) {
 
-        # make a shallow copy of the token:
-        $self->{$_} = $token->{$_} for ( keys %$token );
+        # assign to a hash slice to make a shallow copy of the token.
+        # I guess we could assign to the hash as (by default) there are not
+        # contents, but that seems less helpful if someone wants to subclass us
+        @{$self}{keys %$token} = values %$token;
     }
     return $self;
 }
@@ -293,6 +295,6 @@ L<TAP::Parser::Result::Pragma>,
 L<TAP::Parser::Result::Test>,
 L<TAP::Parser::Result::Unknown>,
 L<TAP::Parser::Result::Version>,
-L<TAP::PARSER::RESULT::YAML>,
+L<TAP::Parser::Result::YAML>,
 
 =cut