From: Matt S Trout Date: Thu, 30 Dec 2021 11:58:50 +0000 (+0000) Subject: Fixage for curry::weak::_ via the inestimable dakkar X-Git-Tag: v2.000001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Fcurry.git;a=commitdiff_plain;h=bedcecab5b4c1f49e7e9b939668f87ae6e964102 Fixage for curry::weak::_ via the inestimable dakkar --- diff --git a/Changes b/Changes index 79ce990..c610dde 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for curry + - Fixage for curry::weak::_ via the inestimable dakkar + 2.000000 - 2021-12-28 - Support curry::_ and curry::weak::_ diff --git a/lib/curry.pm b/lib/curry.pm index 7cf281d..2774a12 100644 --- a/lib/curry.pm +++ b/lib/curry.pm @@ -34,7 +34,7 @@ $curry::weak = sub { } }; -sub curry::_ { &$curry::weak } +sub curry::weak::_ { &$curry::weak } sub AUTOLOAD { my $invocant = shift; diff --git a/t/curry.t b/t/curry.t index 88e093e..5217f7e 100644 --- a/t/curry.t +++ b/t/curry.t @@ -41,7 +41,7 @@ is_deeply($curry->(1), [ $foo, 1 ], 'Curried weak object call'); my $curry2 = $foo->curry::weak::_('foo'); -is_deeply($curry->(1), [ $foo, 1 ], 'Curried weak string method call'); +is_deeply($curry2->(1), [ $foo, 1 ], 'Curried weak string method call'); weaken($weak_foo = $foo);