Explorar o código

Merge pull request #7 from cgf1/main

* lib/Selenium/Client.pm (DESTROY): Localize $? to prevent it from af…
George S. Baugh %!s(int64=4) %!d(string=hai) anos
pai
achega
30eb1035a2
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lib/Selenium/Client.pm

+ 2 - 0
lib/Selenium/Client.pm

@@ -343,6 +343,8 @@ sub _wait ($self) {
 sub DESTROY($self) {
     return unless $self->{auto_close};
 
+    local $?; # Avoid affecting the exit status
+
     print "Shutting down active sessions...\n" if $self->{debug};
     #murder all sessions we spawned so that die() cleans up properly
     if ($self->{ua} && @{$self->{sessions}}) {