Re: [Visualperl-discuss] hash and subs not showing error when duplicate entry
by Eric Promislow other posts by this author
Apr 18 2005 10:14AM messages near this date
view in the new Beta List Site
[Visualperl-discuss] hash and subs not showing error when duplicate entry
|
[Visualperl-discuss] importing environment fonts and colors
Tom Humphrey wrote:
>
> Hello,
>
> Why do I not get a warning (underlined red) with the following:
>
> my $date = {day=>undef,
> month=>undef,
> year=>undef,
> day=>undef
> };
>
>
> The second "day=>undef" should be underlined red by the IDE.
>
> The same goes for subroutines. If I have two with the same name it does
> not give me a warning.
>
> Is this some setting that I need to enable?
Yes -- project properties|Perl options|emit warnings.
Perl doesn't complain about multiple hash entries -- it's a pattern
in the language for overriding some entries in one set of settings
with a new set. For example:
my %hash = (load_default_fonts_and_colors(),
string_foreground => 'indigo',
string_background => 'chatreuse',
);
- Eric
>
> Thanks for the help,
>
> Tom Humprhrey
>
>
> _______________________________________________
> VisualPerl-discuss mailing list
> VisualPerl-discuss@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
VisualPerl-discuss mailing list
VisualPerl-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Tom Humphrey
Eric Promislow
|