From: David Golden Date: Sun, 25 Apr 2010 23:51:07 +0000 (-0400) Subject: fix version::is_strict/is_lax exporting X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88f31b8c13e67525fb34e29a043ddcca6830c3e7;p=p5sagit%2Fp5-mst-13.2.git fix version::is_strict/is_lax exporting These were being exported with a wrapper that treated them as method calls, which causes them to fail. They are just functions, are documented as such, and should never be subclassed, so this patch just exports them directly as functions without the wrapper. --- diff --git a/lib/version.pm b/lib/version.pm index 60e5d6d..405eb10 100644 --- a/lib/version.pm +++ b/lib/version.pm @@ -157,15 +157,11 @@ sub import { } if (exists($args{'is_strict'})) { - *{$callpkg.'::is_strict'} = - sub {return $class->is_strict(shift)} - unless defined(&{$callpkg.'::is_strict'}); + *{$callpkg.'::is_strict'} = \&version::is_strict; } if (exists($args{'is_lax'})) { - *{$callpkg.'::is_lax'} = - sub {return $class->is_lax(shift)} - unless defined(&{$callpkg.'::is_lax'}); + *{$callpkg.'::is_lax'} = \&version::is_lax; } }