in reply to DBI madness
The point would be to avoid using redmon's own internal method for invoking your perl program. Have it write or save its output in some "normal" way so that your perl program (running on its own in a command line shell) can read it.
Update: To check whether its an environment issue, you could add this to your perl script, before the DBI connect call:
Then compare the two versions of the check-env file (the one when run from the command line, the other when run from redmon).open( E, ">", "check-env-$$.txt" ); # adjust path to suit your taste print E "$_ => $ENV{$_}\n" for ( sort keys %ENV ); close E;
Another update: If redmon can be run as a command-line tool, and can write its output to stdout, you could turn the tables: have your perl script run redmon, rather than the other way around:
open( RED, "-|", "redmon arg1 ..." ) or die "redmon failed: $!"; while (<RED>) { # do stuff... print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI madness - Got it :)
by rsilvergun (Acolyte) on Jun 17, 2007 at 04:47 UTC |