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.
My start page (Score:2)
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
Re:My start page (Score:1)
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.