http://www.perlmonks.org?node_id=766817


in reply to Re: Named Subroutine Parameters: Compile-time errors vs. Run-time warnings
in thread Named Subroutine Parameters: Compile-time errors vs. Run-time warnings

Yep. It's just a mistake. A dumb one too, since it was so easy to test. :-(

Chalk it up to wishful thinking on my part. Or maybe just too much blind faith in the compiler: "It's something that would be easy to test at compile-time, ergo it must be tested at compile-time".

Still, at least it's not the worst mistake I made in PBP. ;-)

Damian

PS: I stand by the overall recommendation though. Error messages that point users to the right place are definitely worth the (tiny) overhead of passing named args in a hash.