Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Checking number of values returnedby LanX (Saint) |
on Feb 08, 2015 at 16:24 UTC ( [id://1115941]=note: print w/replies, xml ) | Need Help?? |
Perl is a dynamic language and this kind of static typing with compile time checking belongs to Java or Haskell. Theoretically you could do runtime checking by replacing your function with a wrapper in the middle checking The wrapper could be installed by an attribute. But I doubt the outcome justifies the effort, cause it'll come with notable performance loss for an unusual case. You should rather question your strategy if you're passing around too many positional parameters. Smells a bit like an XY problem...
In Section
Seekers of Perl Wisdom
|
|