---
name: "File::Slurp::WithinPolicy"
section: "3pm"
platform: "linux"
package: "libfile-policy-perl"
version: "1.005-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/File::Slurp::WithinPolicy"
---

# File::Slurp::WithinPolicy(3pm)

Applies filesystem policies to File::Slurp

## NAME

File::Slurp::WithinPolicy - Applies filesystem policies to File::Slurp

## SYNOPSIS

```
  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' );
```

## DESCRIPTION

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).

## FUNCTIONS

### read\_dir

See "read\_dir" in File::Slurp

### read\_file

See "read\_file" in File::Slurp

### write\_file

See "write\_file" in File::Slurp

### append\_file

See "append\_file" in File::Slurp

### overwrite\_file

See "overwrite\_file" in File::Slurp

## EXPORTS

By default, nothing is exported. The `":all"` tag can be used to export everything. Individual methods can also be exported.

## SEE ALSO

File::Slurp, File::Policy

## VERSION

`$Revision:` 1.4 $ on `$Date:` 2005/06/15 10:40:21 $ by `$Author:` simonf $

## AUTHOR

John Alden \<cpan \_at\_ bbc \_dot\_ co \_dot\_ uk\>

## COPYRIGHT

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL.

See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
