Quellcode durchsuchen

Use ->isa check instead of ref check

Daniel Gempesaw vor 10 Jahren
Ursprung
Commit
8b013afcf2
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      lib/Selenium/CanStartBinary.pm

+ 2 - 2
lib/Selenium/CanStartBinary.pm

@@ -180,7 +180,7 @@ sub _build_binary_mode {
 
     my $port = $self->port;
     return unless $port != 4444;
-    if (ref($self) eq 'Selenium::Firefox') {
+    if ($self->isa('Selenium::Firefox')) {
         setup_firefox_binary_env($port);
     }
     my $command = $self->_construct_command($executable, $port);
@@ -223,7 +223,7 @@ sub shutdown_windows_binary {
     # Firefox doesn't have a Driver/Session architecture - the only
     # thing running is Firefox itself, so there's no other task to
     # kill.
-    return if $self->isa('Selenium::Firefox')
+    return if $self->isa('Selenium::Firefox');
 
     my $kill = 'taskkill /FI "WINDOWTITLE eq ' . $self->window_title . '"';
     system($kill);