]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/IO.pm
Add better thread safety
[chaz/p5-File-KDBX] / lib / File / KDBX / IO.pm
index 0ea5d9cd665a0fc4a8c52ae08657680e921aaa0d..48c8e1908a842be7c8c82ac23b55ad7a8d5de4f8 100644 (file)
@@ -43,6 +43,7 @@ sub new {
 
 sub DESTROY {
     return if in_global_destruction;
+    local ($., $@, $!, $^E, $?);
     my $self = shift;
     $self->close;
 }
@@ -366,7 +367,7 @@ if ($ENV{DEBUG_IO}) {
             my $indented_method = (' ' x $debug{level}) . $method;
             my $self = shift;
             print STDERR sprintf('%-20s -> %s (%s)', $indented_method, $self,
-                join(', ', map { defined ? substr($_, 0, 16) : 'undef' } @_)), "\n";
+                join(', ', map { defined $_ ? substr($_, 0, 16) : 'undef' } @_)), "\n";
             my $r = $orig->($self, @_) // 'undef';
             print STDERR sprintf('%-20s <- %s [%s]', $indented_method, $self, $r), "\n";
             return $r;
This page took 0.019984 seconds and 4 git commands to generate.