Error::TypeTiny doesn't like it when there's a minimal call stack:
% cat bug.pl
use v5.10;
use Type::Params -all;
use Types::Standard -all;
signature_for get_products => (
named => [
bar => Optional[Str],
],
);
sub get_products {}
get_products( rs => 3 );
% perl bug.pl
Use of uninitialized value in pattern match (m//) at /home/dj/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/Error/TypeTiny.pm line 61.
Unrecognized parameter: rs at file? line NaN.
Wrapping the call to get_product in a subroutine makes the warning go away.
Error::TypeTiny
doesn't like it when there's a minimal call stack:Wrapping the call to
get_product
in a subroutine makes the warning go away.