Commits

Shlomi Fish committed 9b90a58

Fix for RT #87830 : $@ can become clobbered.

Comments (0)

Files changed (2)

 Revision history for Perl extension XML::LibXML
 
     - Added unique_key
+    - t/40reader.t: assigning from $@ to a lexical so it won't be
+    over-ridden.
+        - https://rt.cpan.org/Ticket/Display.html?id=87830
+        - Thanks to Douglas Christopher Wilson for the report.
 
 2.0019          Mon  1 Jul 11:04:31 IDT 2013
     - Correct typos reported in RT #86599.
     URI => "mystring.xml"
    );
   eval { $reader->finish };
+  my $Err = $@;
   use Data::Dumper;
-  print Dumper($@);
-  print $@;
-  ok((defined $@ and $@ =~ /in mystring.xml at line 3:|mystring.xml:5:/), 'catchin error');
+  # print Dumper($Err);
+  # print $Err;
+  ok((defined($Err) and $Err =~ /in mystring.xml at line 3:|mystring.xml:5:/),
+      'caught the error');
 }
 
 {