From c5446a42e0da6c82f223ad9d35184c92933e4c76 Mon Sep 17 00:00:00 2001 From: Mickey Nasriachi Date: Tue, 11 Oct 2016 14:10:18 +0200 Subject: [PATCH] fix wrong re check against $_ (+ merge to neg. look-ahead) --- lib/Dancer2/Core/App.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Dancer2/Core/App.pm b/lib/Dancer2/Core/App.pm index d9789fecc..90445464e 100644 --- a/lib/Dancer2/Core/App.pm +++ b/lib/Dancer2/Core/App.pm @@ -71,7 +71,7 @@ sub _with_plugin { # short plugin names get Dancer2::Plugin:: prefix # plugin names starting with a '+' are full package names if ( $plugin !~ s/^\+// ) { - $plugin =~ s/^/Dancer2::Plugin::/ unless /^Dancer2::Plugin::/; + $plugin =~ s/^(?!Dancer2::Plugin::)/Dancer2::Plugin::/; } # check if it's already there