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.
Chia-liang Kao <email@example.com>
Copyright 2002 by Chia-liang Kao <firstname.lastname@example.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.