The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PerlIO::via::trap - PerlIO layer to trap write

SYNOPSIS

 use PerlIO::via::trap;

 open( my $in,'<:via(trap)','file.txt' );       # no effect
 open( my $out,'>:via(trap)','file.txt' );      # write will cause confess

 use PerlIO::via::trap ('open');                # auto trap

 $PerlIO::via::trap::PASS = 1;                  # disable trap

DESCRIPTION

This module implements a PerlIO layer that captures attemps to write to files. This is especially useful for debugging modules that are corrupting files.

CAVEATS

Note that the PERLIO environment variable does not work with :via modules, so you need to override core::open if you don't want to change the modules are you trying to fix.

SEE ALSO

PerlIO::via

AUTHORS

Chia-liang Kao <clkao@clkao.org>

COPYRIGHT

Copyright 2002 by Chia-liang Kao <clkao@clkao.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html