talexb has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to redirect STDOUT and STDERR to dev null in a mod_perl handler using the following code:
open(STDOUT, ">/dev/null") or $log->die("Unable to redirect STDOUT to dev null: $!"); open(STDERR, ">/dev/null") or $log->die("Unable to redirect STDERR to dev null: $!");
I'm obviously doing something boneheaded, because this gives me the following error:
[Mon Nov 27 16:54:52 2006] [error] [client 192.168.0.115] Can't locate object method "OPEN" via package "Apache::RequestRec" at ..I'm confused .. I thought open was available everywhere .. you know, like a CORE function? I did a chdir a little before the open, and mod_perl didn't complain about that.
Thanks ..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mod_perl seems to have disappeared the open function
by rhesa (Vicar) on Nov 27, 2006 at 23:10 UTC | |
by ikegami (Patriarch) on Nov 27, 2006 at 23:44 UTC | |
by talexb (Chancellor) on Nov 28, 2006 at 04:28 UTC | |
by talexb (Chancellor) on Nov 28, 2006 at 04:23 UTC | |
|
Re: mod_perl seems to have disappeared the open function
by Firefly258 (Beadle) on Nov 27, 2006 at 23:27 UTC | |
|
Re: mod_perl seems to have disappeared the open function (untie)
by tye (Sage) on Nov 27, 2006 at 23:51 UTC |