Hacker News new | ask | show | jobs
by bmn__ 2519 days ago
> sub mymethod($$)

That does not work. Prototypes are ignored for method calls. You are expected to not abuse prototypes for signatures as they serve a different purpose.

> it's an untyped language

That's wrong even with the most lenient/charitable interpretation. Using an unexpected type of data is a fatal error.

    perl -e'$x = {}; $x->[0]; print "survived"'
    Not an ARRAY reference at -e line 1.
Type constraints have existed for a very long time, for example see http://p3rl.org/Kavorka::Manual::Signatures#Type-constraints