Skip to content

Commit 2104c69

Browse files
craigberrytonycoz
authored andcommitted
(perl #127380) Update PERLIO_DEBUG documentation.
Now defaults to stderr if unspecified, and requires -Di (and thus -DDEBUGGING). TonyC: modify a couple of verbatim lines to bring them under the limit enforced by the new podcheck.t changes
1 parent 6432086 commit 2104c69

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

pod/perlapio.pod

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,23 +499,25 @@ debugging. No return value. Its main use is inside PerlIO where using
499499
real printf, warn() etc. would recursively call PerlIO and be a
500500
problem.
501501

502-
PerlIO_debug writes to the file named by $ENV{'PERLIO_DEBUG'} typical
502+
PerlIO_debug writes to the file named by $ENV{'PERLIO_DEBUG'} or defaults
503+
to stderr if the environment variable is not defined. Typical
503504
use might be
504505

505506
Bourne shells (sh, ksh, bash, zsh, ash, ...):
506-
PERLIO_DEBUG=/dev/tty ./perl somescript some args
507+
PERLIO_DEBUG=/tmp/perliodebug.log ./perl -Di somescript some args
507508

508509
Csh/Tcsh:
509-
setenv PERLIO_DEBUG /dev/tty
510-
./perl somescript some args
510+
setenv PERLIO_DEBUG /tmp/perliodebug.log
511+
./perl -Di somescript some args
511512

512513
If you have the "env" utility:
513-
env PERLIO_DEBUG=/dev/tty ./perl somescript some args
514+
env PERLIO_DEBUG=/tmp/perliodebug.log ./perl -Di somescript args
514515

515516
Win32:
516-
set PERLIO_DEBUG=CON
517-
perl somescript some args
517+
set PERLIO_DEBUG=perliodebug.log
518+
perl -Di somescript some args
518519

519-
If $ENV{'PERLIO_DEBUG'} is not set PerlIO_debug() is a no-op.
520+
On a Perl built without C<-DDEBUGGING>, or when the C<-Di> command-line switch
521+
is not specified, or under taint, PerlIO_debug() is a no-op.
520522

521523
=back

pod/perlrun.pod

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,19 +1155,22 @@ is run in taint mode.
11551155
=item PERLIO_DEBUG
11561156
X<PERLIO_DEBUG>
11571157

1158-
If set to the name of a file or device, certain operations of PerlIO
1159-
subsystem will be logged to that file, which is opened in append mode.
1160-
Typical uses are in Unix:
1158+
If set to the name of a file or device when Perl is run with the
1159+
B<-Di> command-line switch, the logging of certain operations of
1160+
the PerlIO subsystem will be redirected to the specified file rather
1161+
than going to stderr, which is the default. The file is opened in append
1162+
mode. Typical uses are in Unix:
11611163

1162-
% env PERLIO_DEBUG=/dev/tty perl script ...
1164+
% env PERLIO_DEBUG=/tmp/perlio.log perl -Di script ...
11631165

11641166
and under Win32, the approximately equivalent:
11651167

11661168
> set PERLIO_DEBUG=CON
1167-
perl script ...
1169+
perl -Di script ...
11681170

1169-
This functionality is disabled for setuid scripts and for scripts run
1170-
with B<-T>.
1171+
This functionality is disabled for setuid scripts, for scripts run
1172+
with B<-T>, and for scripts run on a Perl built without C<-DDEBUGGING>
1173+
support.
11711174

11721175
=item PERLLIB
11731176
X<PERLLIB>

0 commit comments

Comments
 (0)