From: Rafael Garcia-Suarez Date: Thu, 14 May 2009 13:14:42 +0000 (+0200) Subject: Fix failing autodie test with new smartmatch semantics. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7fecd077a7bc92add80772966a8c824277223d09;p=p5sagit%2Fp5-mst-13.2.git Fix failing autodie test with new smartmatch semantics. This is because ~~ overloading is now only taken into account when the object is on the right of the operator. --- diff --git a/lib/autodie/t/exceptions.t b/lib/autodie/t/exceptions.t index 2f8c238..60d5d95 100644 --- a/lib/autodie/t/exceptions.t +++ b/lib/autodie/t/exceptions.t @@ -18,10 +18,10 @@ eval { }; ok($@, "Exception thrown" ); -ok($@ ~~ 'open', "Exception from open" ); -ok($@ ~~ ':file', "Exception from open / class :file" ); -ok($@ ~~ ':io', "Exception from open / class :io" ); -ok($@ ~~ ':all', "Exception from open / class :all" ); +ok('open' ~~ $@, "Exception from open" ); +ok(':file' ~~ $@, "Exception from open / class :file" ); +ok(':io' ~~ $@, "Exception from open / class :io" ); +ok(':all' ~~ $@, "Exception from open / class :all" ); eval { no warnings 'once'; # To prevent the following close from complaining. @@ -38,8 +38,8 @@ eval { like($@, qr{Can't close filehandle 'THIS_FILEHANDLE_AINT_OPEN'},"Nice msg from close"); ok($@, "Exception thrown" ); -ok($@ ~~ 'close', "Exception from close" ); -ok($@ ~~ ':file', "Exception from close / class :file" ); -ok($@ ~~ ':io', "Exception from close / class :io" ); -ok($@ ~~ ':all', "Exception from close / class :all" ); +ok('close' ~~ $@, "Exception from close" ); +ok(':file' ~~ $@, "Exception from close / class :file" ); +ok(':io' ~~ $@, "Exception from close / class :io" ); +ok(':all' ~~ $@, "Exception from close / class :all" );