Scalar::Util::weaken($invocant) if Scalar::Util::blessed($invocant);
my @args = @_;
sub {
- return unless $invocant;
+ return unless defined $invocant;
$invocant->$code(@args => @_)
}
};
my ($method) = our $AUTOLOAD =~ /^curry::weak::(.+)$/;
my @args = @_;
return sub {
- return unless $invocant;
+ return unless defined $invocant;
$invocant->$method(@args => @_);
}
}