浏览代码

force modern version of perl

George S. Baugh 4 年之前
父节点
当前提交
429d8062ae
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lib/Playwright.pm

+ 4 - 2
lib/Playwright.pm

@@ -22,9 +22,11 @@ use Playwright::Base();
 use Playwright::Util();
 
 #ABSTRACT: Perl client for Playwright
+use 5.006;
+use v5.28.0;    # Before 5.006, v5.10.0 would not be understood.
 
 no warnings 'experimental';
-use feature qw{signatures state};
+use feature qw{signatures};
 
 =head1 SYNOPSIS
 
@@ -302,7 +304,7 @@ sub _check_and_build_spec ($self) {
     $spec = Playwright::Util::request(
         'GET', 'spec', $self->{port}, $self->{ua},
     );
-
+    confess("Could not retrieve Playwright specification.  Check that your playwright installation is correct and complete.") unless ref $spec eq 'HASH';
     return $spec;
 }