DEV Community

loading...

Discussion on: Better Perl with subroutine signatures and type validation

Collapse
mjgardner profile image
Mark Gardner Author • Edited

Yah, in general, I would avoid prototypes. Per Damian Conway's Perl Best Practices, they're a bit difficult in that they will turn arrays that you think will be treated like individual list items into being evaluated in scalar context, thus only passing the number of elements in the array. They're a bit too magical.

Thanks for the tip about syntax highlighting! I'm new to publishing here, so everything helps!