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

Re: Stupid mistakes I repeatedly make

by matthewb (Curate)
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

Replies are listed 'Best First'.
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?
[LanX]: AnomalousMonk: yeah the asteroid but not the god, right?
[jedikaiti]: :-)
[AnomalousMonk]: LanX: Of course the asteroid! There is/are no god(s).

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2017-11-22 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (327 votes). Check out past polls.

    Notices?