From 82e524c28084ca08d120434390338a6e4f24a491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Sat, 5 Jul 2014 22:39:53 +0200 Subject: [PATCH] Base: simplify declaration of ~~ overload --- lib/Syntax/Keyword/Junction/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Syntax/Keyword/Junction/Base.pm b/lib/Syntax/Keyword/Junction/Base.pm index dc7fff6..f9257c6 100644 --- a/lib/Syntax/Keyword/Junction/Base.pm +++ b/lib/Syntax/Keyword/Junction/Base.pm @@ -20,9 +20,9 @@ use overload( 'lt' => "str_lt", 'bool' => "bool", '""' => sub {shift}, + $] >= 5.010001 ? ('~~' => 'match') : (), ); -use if ($] >= 5.010001), overload => '~~' => 'match'; sub new { bless \@_, shift }