in reply to The Secret Features of Perl6

Great idea! In the proud tradition of great eggs like make love! Another one to detect is when someone uses a simple C-style for iterator loop, and say something about it along the lines of, "What an insult! This is perl, not C! on Line \d+". I'm sure some other good fodder for newbie error messages will be easily found by browsing SoPW. Or what about, when under warnings, if the programmer misspells a variable (the awful used only once error) send a message like "NodeReaper swallows $foobor, it was tasty. $foobor used only once at line \d+".

Of course you'd still have to describe the actual error, lest we scare off new monks :) Anyway, from your list, my vote goes for the CGI warning. ++

mhoward - at - hattmoward.org

Replies are listed 'Best First'.
Re: Re: The Secret Features of Perl6
by diotalevi (Canon) on Jun 15, 2003 at 20:11 UTC

    Detecting for(;;) constructs is doable in perl5. Its a good project for a budding perlguts hacker to try.

    Added: If you want to do this its solution likely involves looking at the optree structure created by saying for(;;) and then using B::Util/B to detect those structures. You should also look at perly.y to see the initialize, while( condition ) { ...; increment } structure.