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 ]

Elthek (2737)

  (email not shown publicly)

Journal of Elthek (2737)

Saturday June 29, 2002
02:17 PM

Filehandle fun.

[ #6071 ]

void:chris~ % perl -e 'use IO::Timestamp::STDERR; print STDERR "pony!\n"'
[Sat Jun 29 20:08:58 2002]: pony!

void:chris~ % perl -e 'use IO::Timestamp; tie *FD, 'IO::Timestamp'; print FD "pony!\n"'
[Sat Jun 29 20:08:40 2002]: pony!

Well, I'm sure someone somewhere will find it useful, especially with PerlModule inside Apache. If this is you, let me know and I'll do the PAUSE thing. Maybe. I'd rather have hidden the ties and had 'use IO::Timestamp *FD;', but there's perl brokenness when throwing tied FDs around and I don't think it can be done. Living with richardc has its advantages, in that he offered to get Devel::Caller to be able to resolve the filehandles and allow the tie to go through to them. People who understand opcode mangling plus-plus.

I start at MSDW on Monday. I've less than two days of non-suitdom left.

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.
  • That's pretty zippy! I like it!

    Ya know, one thing I came up with recently that maybe you could work into a related class is: emitting a timestamp only if time() is the different from the time() that it was when the last event was logged. It makes the log files much more readably concise. Try it, you'll like it!