[tpm] hash naming convention: singular or plural
Fernando Oliveira
fernandocorrea at gmail.com
Fri Aug 8 07:44:37 PDT 2008
The PBP say to use hash named in singular.
2008/8/8 Alexander Anderson <a.anderson at utoronto.ca>
> Hello Toronto Perl Mongers,
>
> Names of scalars are usually singular, for example,
>
> $month = 'Aug';
>
> Names of arrays are usually plural, for example,
>
> @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
>
> How do you name your hashes, for example,
>
> %months = ( Jan => 1, Feb => 2, ..., Dec => 12 );
> or
> %month = ( Jan => 1, Feb => 2, ..., Dec => 12 );
>
> Thanks.
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
>
--
Just another Perl Hacker,
Fernando (SmokeMachine)
http://perl-e.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20080808/8a468f70/attachment.html>
More information about the toronto-pm
mailing list