in reply to What Are The Rules For Subs And Modules When Fed Wrong Input

If I've written a sub or module which expects, say, three variables to be passed to it, what should it do when it gets two?

Consider CGI.pm as an exemplar. Return undef if an argument is missing and you can't substitute a reasonable default. die as a last resort.