Subject: | Optionally Silence Warnings |
Inside Flexo (the next generation of Bender) I have code like the following:
my $choice = $self->rps->name_to_num($$message);
return PCI_EAT_NONE unless $choice;
But if I pass anything that isn't valid I get:
Invalid Throw Name TRUST BAR, returning undef at
/Users/perigrin/foo/lib/perl5/Games/Roshambo.pm line 90.
Which is fair but it causes warnings unless I specifically check for
valid throw names which is silly since you check yet again for a valid
throw name. I'd like to be able to optionally disable this warning somehow.