Ver Fonte

Merge pull request #7 from cgf1/main

* lib/Selenium/Client.pm (DESTROY): Localize $? to prevent it from af…
George S. Baugh há 4 anos atrás
pai
commit
30eb1035a2
1 ficheiros alterados com 2 adições e 0 exclusões
  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}}) {