develooper Front page | perl.perl5.porters | Postings from May 2008

RE: Should potentially confusing labels emit a warning?

Thread Previous | Thread Next
Ed Avis
May 15, 2008 09:48
RE: Should potentially confusing labels emit a warning?
Message ID:
Dominic Dunlop <> wrote:

[writing BEGIN: {} instead of BEGIN {}]

>>I think that a warning is a good idea - I can't imagine any false 

>Trouble is, some of it's CGI, and people whinge loudly when 
>previously- clean CGI starts warning:

Ha ha ha.  I think any possible programmer mistake can be found in a Perl CGI program somewhere.  The use in mhaadmin.cgi is an error, the programmer intended a BEGIN block (though presumably the script still works if the code is executed after compilation has finished).  The use in search_tags.cgi is a genuine loop label jumped to with 'next'.

IMHO, the existence of this code is an argument in _favour_ of adding the warning.  After all warnings do not stop code working but just give a message to the programmer.  People who complain about that are shooting the messenger.

Ed Avis <> 

This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About