Просмотр исходного кода

Fix #147: Allow S:R:D to be inflated to a Moose class

Attributes that are `is => 'rw'` and `lazy => 1` that don't have a
`default => ...` apparently cause deep recursion. We changed those attrs
to be `is => 'lazy'` (which also means `is => 'ro'`, which is probably
better anyway, as immutable things are easier to reason about.)
Daniel Gempesaw 10 лет назад
Родитель
Сommit
3159f278ab
1 измененных файлов с 3 добавлено и 6 удалено
  1. 3 6
      lib/Selenium/Remote/Driver.pm

+ 3 - 6
lib/Selenium/Remote/Driver.pm

@@ -285,8 +285,7 @@ has 'browser_name' => (
 );
 
 has 'base_url' => (
-    is      => 'rw',
-    lazy    => 1,
+    is      => 'lazy',
     coerce  => sub {
         my $base_url = shift;
         $base_url =~ s|/$||;
@@ -413,14 +412,12 @@ has 'firefox_profile' => (
 );
 
 has 'desired_capabilities' => (
-    is        => 'rw',
-    lazy      => 1,
+    is        => 'lazy',
     predicate => 'has_desired_capabilities'
 );
 
 has 'inner_window_size' => (
-    is        => 'rw',
-    lazy      => 1,
+    is        => 'lazy',
     predicate => 1,
     coerce    => sub {
         my $size = shift;