PerlIO::via::trap - PerlIO layer to trap write
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
This module implements a PerlIO layer that captures attemps to write to files. This is especially useful for debugging modules that are corrupting files.
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.
PerlIO::via
Chia-liang Kao <clkao@clkao.org>
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
To install PerlIO::via::trap, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlIO::via::trap
CPAN shell
perl -MCPAN -e shell install PerlIO::via::trap
For more information on module installation, please visit the detailed CPAN module installation guide.