Hash parsing considered ugly
James Mastros
james at mastros.biz
Sun Feb 26 23:43:52 GMT 2006
On Sun, 2006-02-26 at 22:00 +0200, Jonathan McKeown wrote:
> On Sunday 26 February 2006 00:27, drkjam wrote:
>
> > my %h = (
> > foo => 1,
> > foo => 2,
>
> [leads to %h being ( foo => 2 )]
> > Is there any way at all to get Perl to flag this with at least some form
> > of warning?
>
> Why? Consider:
[useful use of this snipped].
You could still warn when it's done literally, which has no real useful
use. On the other hand, writing code to handle such a corner case seems
hardly worth it.
-=- James Mastros
More information about the london.pm
mailing list