SPUG: Regexp::Assemble question

Mark Mertel mark.mertel at yahoo.com
Wed Feb 25 09:20:47 PST 2009

Mr. Sweger,

I'm no expert, but it seems to me that Mr. Krahn's comments are all perfectly valid, and I can detect no ill intent, or slander towards the original poster. His are the types of comments to be expected during a professional code review. Were these directed at code I had written, I would welcome them rather than take them personally.
Mark Mertel

From: Andrew Sweger <andrew at sweger.net>
To: John W. Krahn <jwkrahn at shaw.ca>
Cc: SPUG <spug-list at mail.pm.org>
Sent: Wednesday, February 25, 2009 8:55:13 AM
Subject: Re: SPUG: Regexp::Assemble question

On Tue, 24 Feb 2009, John W. Krahn wrote:

> Emails do not have colours, they are just plain text.

Mine doesn't. But I know some do. Regardless, Amit's intent was still

> Is this your actual code?  If so, you don't need the subroutines at all, 
> you just need the keys.  And why use a hash reference instead of a hash?

Your tone suggests that all Perl programmers should use it in the same way
(your's aparently). Where I come from, Perl is spoken by people of every
skill level; from baby-perl-talk to uber-l33t-golpher-perl. If the code
works, it works. Style and convention mostly become a matter of teamwork.
This list is about learning and sharing Perl. I suspect you might not have
realized this (considering your reply to Amit and your previous reply to
this list).

> Why all the duplicate code?
>      my $mode = qx(file $filename) =~ /gzip/i ? '<:gzip' : '<';
>      open MYINPUTFILE, $mode, $filename or $Logger->logdie( "Error 
> opening file: $!" );


> No need for this variable as Perl provides the $. built-in variable that 
> keeps track of the current line number.

Maybe so, but $lines is a lot more obvious than $. when it comes time to
review or update the code. Perhaps $INPUT_LINE_NUMBER (via English.pm)
could be even more obvious (and mean *exactly* the same thing as $.,
whereas $lines could actually mean something slightly different!).

> Those people who think they know everything are a great
> annoyance to those of us who do.        -- Isaac Asimov

Wow. Again?

Let me put it simply: knock it off. If you want to bash people about how
they write Perl, go hang out on Usenet or some obscure IRC channel. It's
not welcome here.

Andrew B. Sweger -- The great thing about multitasking is that several
                                things can go wrong at once.

Seattle Perl Users Group Mailing List
    POST TO: spug-list at pm.org
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
    MEETINGS: 3rd Tuesdays
    WEB PAGE: http://seattleperl.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/spug-list/attachments/20090225/82f90994/attachment-0001.html>

More information about the spug-list mailing list