Applies filesystem policies to file::slurp
use File::Slurp::WithinPolicy qw(:all);
my $text = read_file( 'filename' ); my @lines = read_file( 'filename' ); write_file( 'filename', $text ); append_file( 'filename', $more_text ); overwrite_file( 'filename', $text ); my @files = read_dir( '/path/to/dir' );
This provides the File::Slurp interface within a policy defined by File::Policy. By default, File::Policy is a no-op and this behaves identically to File::Slurp. System administrators may want to override the default File::Policy implementation to enforce a local filesystem policy (see File::Policy).
\$1
See \*(L"read_dir\*(R" in File::Slurp See \*(L"read_file\*(R" in File::Slurp See \*(L"write_file\*(R" in File::Slurp See \*(L"append_file\*(R" in File::Slurp See \*(L"overwrite_file\*(R" in File::Slurp
By default, nothing is exported. The \*(C`:all\*(C' tag can be used to export everything. Individual methods can also be exported.
File::Slurp, File::Policy
$Revision: 1.4 $ on $Date: 2005/06/15 10:40:21 $ by $Author: simonf $
John Alden <cpan _at_ bbc _dot_ co _dot_ uk>
(c) \s-1BBC\s0 2005. This program is free software; you can redistribute it and/or modify it under the \s-1GNU\s0 \s-1GPL\s0.
See the file \s-1COPYING\s0 in this distribution, or http://www.gnu.org/licenses/gpl.txt