From: Graham Knop Date: Thu, 5 Feb 2015 09:50:13 +0000 (-0500) Subject: better diagnostics on version check failure X-Git-Tag: v1.999_002~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=180697542bde534b53460e128cddb8af1c01736a;p=p5sagit%2Fstrictures.git better diagnostics on version check failure --- diff --git a/t/strictures.t b/t/strictures.t index b721a66..1cb8e40 100644 --- a/t/strictures.t +++ b/t/strictures.t @@ -51,4 +51,7 @@ my $v; eval { $v = strictures->VERSION; 1 } or diag $@; is $v, $strictures::VERSION, '->VERSION returns version correctly'; -ok(!eval q{use strictures 3; 1; }, "Can't use strictures 3 (this is version 2)"); +eval q{ use strictures 3; }; + +like $@, qr/strictures version 3 required/, + "Can't use strictures 3 (this is version 2)";