Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
This is something between a SOPW and a Meditation. I'm not really asking a question, just grousing...

I suspect every language has its idiosyncratic compiler error messages. I know Perl is not immune. Consider:

C:\>perl -c ag2gen.pl "my" variable $i masks earlier declaration in same statement at ag2gen +.pl line 1391. "my" variable @test_order masks earlier declaration in same scope at a +g2gen.pl line 1391. "my" variable @test_order masks earlier declaration in same statement +at ag2gen.pl line 1393. "my" variable $i masks earlier declaration in same statement at ag2gen +.pl line 1393. "my" variable @test_order masks earlier declaration in same statement +at ag2gen.pl line 1393. "my" variable $j masks earlier declaration in same statement at ag2gen +.pl line 1393. "my" variable %test_order masks earlier declaration in same scope at a +g2gen.pl line 1394. "my" variable @test_order masks earlier declaration in same statement +at ag2gen.pl line 1394. "my" variable $i masks earlier declaration in same statement at ag2gen +.pl line 1394. "my" variable @test_order masks earlier declaration in same statement +at ag2gen.pl line 1394. "my" variable $j masks earlier declaration in same statement at ag2gen +.pl line 1394. syntax error at ag2gen.pl line 1389, near "2]" ag2gen.pl had compilation errors.
Here are the offending lines:
1389: for my $i (0..@test_order-2]) 1390: { 1391: for my $j ($i+1..@test_order-1) 1392: { 1393: unless ( ( $test_order[$i] eq $test_order[$j] ) 1394: or exists($test_order{"$test_order[$i]\t$test_order[$j]"} +) )
for my $i doesn't mask anything. In fact, it doesn't compile (at least, not completely).

-QM
--
Quantum Mechanics: The dreams stuff is made of


In reply to More Misleading Compiler Error Messages by QM

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (3)
    As of 2014-07-26 20:15 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (179 votes), past polls