Syntactic Confectionery Delight | |
PerlMonks |
Re^5: Tao Perl Ching - The Scripture of the Way of Perlby Juerd (Abbot) |
on Jan 20, 2005 at 22:02 UTC ( [id://423807]=note: print w/replies, xml ) | Need Help?? |
There are good reasons for many of those things. Vars begins with an upper-case V because vars is a Perl reserved word. It may be a reason, but it certainly is not a GOOD reason. It's an awful one. If the name you want is taken, then invent another name! Don't find alternative ways to write the same thing for that WILL cause confusion and WILL look ugly. It is not even true. "vars" is not a reserved Perl word. There is a module called vars, but use is not the context. The context is a sub/method name, and you can without any trouble call that &vars:
I use Params::Validate to normalize the keys, allowing but not requiring the prefixed minus. The only reason a minus is needed or wanted is wanting to allow a combination of positional and named arguments. Allowing a minus is nice for people who insist on consistent style (but those people should prepare for re-coding CPAN entirely), but IMnsHO it's a waste of CPU cycles to look for them. Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In Section
Meditations
|
|