ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> visualperl-discuss
visualperl-discuss
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved