summaryrefslogtreecommitdiff
path: root/pod/perltie.pod
diff options
context:
space:
mode:
authorSteve Grazzini <grazz@pobox.com>2003-06-18 15:42:37 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2003-06-19 14:08:13 +0000
commit7ff032551aa263179d4cb6df3dd91502d713e6ba (patch)
tree7dd25bf874fe4d2842d7e56fa2b9da375cf60df3 /pod/perltie.pod
parentca9279baf07d6843f58a31f1ce3ff7dc875faf1a (diff)
downloadperl-7ff032551aa263179d4cb6df3dd91502d713e6ba.tar.gz
Re: [perl #17934] tied STDERR and internal warnings
Message-ID: <20030618234237.GA6267@grazzini.net> p4raw-id: //depot/perl@19819
Diffstat (limited to 'pod/perltie.pod')
-rw-r--r--pod/perltie.pod13
1 files changed, 10 insertions, 3 deletions
diff --git a/pod/perltie.pod b/pod/perltie.pod
index 3665f0420e..8f3a6774ae 100644
--- a/pod/perltie.pod
+++ b/pod/perltie.pod
@@ -794,9 +794,16 @@ READ, and possibly CLOSE, UNTIE and DESTROY. The class can also provide: BINMOD
OPEN, EOF, FILENO, SEEK, TELL - if the corresponding perl operators are
used on the handle.
-It is especially useful when perl is embedded in some other program,
-where output to STDOUT and STDERR may have to be redirected in some
-special way. See nvi and the Apache module for examples.
+When STDERR is tied, its PRINT method will be called to issue warnings
+and error messages. This feature is temporarily disabled during the call,
+which means you can use C<warn()> inside PRINT without starting a recursive
+loop. And just like C<__WARN__> and C<__DIE__> handlers, STDERR's PRINT
+method may be called to report parser errors, so the caveats mentioned under
+L<perlvar/%SIG> apply.
+
+All of this is especially useful when perl is embedded in some other
+program, where output to STDOUT and STDERR may have to be redirected
+in some special way. See nvi and the Apache module for examples.
In our example we're going to create a shouting handle.