Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

output-monitoring module
Please forgive me for asking here, I have done some searches and come up
empty but I still think this module may have been written and want to
know for sure before I go trying to roll my own.

I'm thinking of writing a module which would monitor the output of any
script which "use"d it looking for errors. E.g. something like this

use Output::Monitor STDOUT => qr/re1/, STDERR => qr/re2/;

This would - perhaps by using tied filehandles - watch all data flowing
to stdout and stderr, apply the specified REs to each line, and convert
the exit status to nonzero if any matches occur.

The idea is to replace a common technique where I work, which is to
write build scripts to divert their own output to a logfile internally,
then read that logfile to discover any unflagged errors. This makes it
hard for external tools to redirect output as they choose, requires
intimate knowledge of the script to know where it's writing its logfile
to, etc. What I'd hope to achieve with the above is transparency, i.e.
by simply including the module within a script it would be converted
from unchecked to checked, without the script having to change anything
else while the same data as before flows to stdout and stderr.

Before anyone says "just check exit status" - we do but we're stuck with
certain underlying build tools which have unreliable status so we must
parse output as a belt-and-suspenders plan.

Does anyone know of such a module, or something close to use as a
starting point?

--
Henry Townsend

Report this thread to moderator Post Follow-up to this message
Old Post
Henry Townsend
04-06-05 05:40 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:59 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.