Welcome to the Monastery | |
PerlMonks |
Re^2: Thoughts on "one function, flexible arguments"?by hornpipe2 (Sexton) |
on Sep 01, 2019 at 02:18 UTC ( [id://11105363]=note: print w/replies, xml ) | Need Help?? |
I did some further research on Perlmonks, and found that there are pros and cons to accepting hashref vs listified hash. For example if you make an error in building your hash: one dies at compile-time, the other at run-time.
I also went out to MetaCPAN and checked the most popular modules list. Using this (highly unscientific) method I determined that most module authors (LWP::UserAgent, DateTime) have gone with listified hash, instead of hashref. So, that is what I'll stick to as well.
In Section
Seekers of Perl Wisdom
|
|