Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Stupid mistakes I repeatedly make

by matthewb (Deacon)
on Mar 27, 2005 at 09:24 UTC ( #442601=note: print w/ replies, xml ) Need Help??


in reply to Stupid mistakes I repeatedly make

++ nice to know you're human.

I have a personal bug that typically irritates me about twice a week. It is that, even if it is a value in some hash, my brain interprets a method call as a something that should end with a semicolon. Thus, I frequently type something like:

my $hash = { key1 => 'scalar value', key2 => [ qw( its an array ) ], key3 => Some::Package->method( $args, $go, $here, ); # <-- oops! };

This is somewhat insidious because it doesn't break emacs' syntax highlighting and perl -c /path/to/script reports the error as being on the next line. Ho hum, confession is good for the soul.


MB


Comment on Re: Stupid mistakes I repeatedly make
Select or Download Code
Re^2: Stupid mistakes I repeatedly make
by brian_d_foy (Abbot) on Mar 28, 2005 at 01:58 UTC

    Ah, yes, I've done that one quite a bit too, and it's not just in a hash: I get it for list creation that goes into a normal array (or even into a list operator). I think this one is just finger memory: a semicolon just automatically comes after a closing paren.

    --
    brian d foy <brian@stonehenge.com>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://442601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-12-25 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls