Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Friday March 01, 2002
12:21 PM


[ #3225 ]

Whew, I'm SO glad that's over. The 16000 line program no longer has any globals (at least no non-constant globals). Now I can move functions into different files and as long as I export the right functions everywhere, it should all just work.

Well, I did all that while being sick, and it didn't really contribute to my recovery, so I'm going to take it easy for a little while now.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • The 16000 line program no longer has any globals (at least no non-constant globals).

    I was just thinking about that particular antipattern today. I'm dealing with code like this:

    my $DB = 'db';
    my $PARAM = 'param';

    $obj->{$DB}->{$PARAM} = $FOO;

    Now, obviously that's bad style, but why is it bad style? Then it struck me that it's a perversion of an old FORTRAN/C meme about peppering constant values around as bad style. Sure, it helps to put PI into a [constant] variable so that you locali

  • ... called Slash. :-) It acutally wasn't as bad as its reputation. There were just a few globals, and a bunch of undeclared variables, but only a handful of conflicts. But there were a lot of lines of code to go through.