[Melbourne-pm] Newbie crypto/bcrypt question

Toby Wintermute tjc at wintrmute.net
Fri May 23 02:10:14 PDT 2014

On 23 May 2014 18:33, Alfie John <alfiej at fastmail.fm> wrote:
> tl;dr: typo :(

Parameter validation is an area where Perl falls down, massively,
compared to many other languages.
If a function can only accept parameters of blue and green, then
damnit, it should throw an error if you pass in red.

Creating objects with Moose/Moo/FlavourOfTheMoonth and creating
methods with one of the parameter validation modules goes some way to
fix this glaring oversight, but.. it's creating a lot of extra
boilerplate and code to do something that other languages take for

Using hashes to pass data structures around is another terrible idea
that's commonly used in Perl.
How often have you seen code that does something like:

my $data = { firstname => "Toby", surname => "Winter" };
enable_mononym($data) unless $foo->{sirname};

No compile time error. No run-time warning. Awesome :/

More information about the Melbourne-pm mailing list