Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
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.