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

use Perl Log In

Log In

[ Create a new account ]

chaoticset (2105)

chaoticset
  (email not shown publicly)
http://chaoticset.perlmonk.org/
AOL IM: chaoticset23 (Add Buddy, Send Message)
Yahoo! ID: illuminatus_foil (Add User, Send Message)

JAPH. (That's right -- I'm not Really Inexperienced any more.)

I'm not just here, I'm here [perlmonks.org], and here [javajunkies.org] too, I ramble randomly in my philosophical blog [blogspot.com] and my other blog [blogspot.com]. Soon I'll come in a convenient six-pack.

Journal of chaoticset (2105)

Friday August 23, 2002
10:33 PM

Ripoffs

[ #7276 ]
First, I got started gutting petdance's start page (linked a while back in his journal here) for my very own twisted purposes. Fast going, once I figured out what was going on.

Next, I decided to work on a Log module (even though another one probably exists) because I figured it would be good practice for writing modules for CPAN, even if I never send it there. The intended function for it is to import the function log:

log('text to log');
log(lognumber, 'text to log');
log({ lognumber => "filename" });

where the first is the simplest usage, the second is usage with switchable log files, and the third is the syntax for designating the filename for a switchable log file.

The part where it's a total ripoff is that I want the use Log; part of the module to switch all the log() functions on and off, as in

use Log qw('on');
use Log qw('off');

which is pretty much just a batch of functionality I've been implementing myself, with a variable set to 0 or 1 and a print statement wrapped inside an if and an open statement wrapped inside the same if. I just figured it would save me typing.

I toyed briefly with the notion of looking around, because I'm sure that CPAN has a much better logging module somewhere, but like I said, this is practice, and what the hell. Even if I'm the only person who ever uses it, it'll help me on little things that only I would ever see.

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.
  • What did you do with my start page [petdance.com]? I'm curious to know.

    Of course, it's autogenerated so it's not the same start page as when you started poking at it last. Maybe I'll link to the source code somewhere.

    --

    --
    xoa

    • I noticed that it was generated, but I worked from a static copy, just finding the notion of such a thing highly useful.

      Most of it was removing tools I didn't use, topics I wasn't particularly interested in, and adding several news sites. That plus a few changes to the stylesheet that I happen to find readable but probably everyone else will find disgusting :) The link is here [perlmonk.org]. Oh, and it's very nasty HTML right now -- I didn't attempt to improve readability anywhere except where I made modifications o

      --

      ------------------------------
      You are what you think.