GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FILE::SLURP::TINY (3)

.ds Aq ’

NAME

File::Slurp::Tiny - A simple, sane and efficient file slurper [DISCOURAGED]

CONTENTS

VERSION

version 0.004

SYNOPSIS



 use File::Slurp::Tiny read_file;
 my $content = read_file($filename);



DISCOURAGED

<B>This module is discouraged in favor of File::SlurperB>. While a useful experiment, it turned out to be both too similar to File::Slurp (still containing most problematic features of File::Slurp’s interface) and yet not similar enough to be a true drop-in replacement.

Bugs will still be fixed, but new features will probably not be added.

DESCRIPTION

This module provides functions for fast and correct slurping and spewing. All functions are optionally exported.

FUNCTIONS

read_file($filename, CW%options)

Reads file $filename into a scalar. By default it returns this scalar. Can optionally take these named arguments:
o binmode

Set the layers to read the file with. The default will be something sensible on your platform.

o buf_ref

Pass a reference to a scalar to read the file into, instead of returning it by value. This has performance benefits.

o scalar_ref

If set to true, read_file will return a reference to a scalar containing the file content.

read_lines($filename, CW%options)

Reads file $filename into a list/array. By default it returns this list. Can optionally take these named arguments:
o binmode

Set the layers to read the file with. The default will be something sensible on your platform.

o array_ref

Pass a reference to an array to read the lines into, instead of returning them by value. This has performance benefits.

o chomp

chomp the lines.

write_file($filename, CW$content, CW%options)

Open $filename, and write $content to it. Can optionally take this named argument:
o binmode

Set the layers to write the file with. The default will be something sensible on your platform.

read_dir($dirname, CW%options)

Open dirname and return all entries except . and ... Can optionally take this named argument:
o prefix

This will prepend $dir to the entries

SEE ALSO

o Path::Tiny

A minimalistic abstraction not only around

o File::Slurp

Another file slurping tool.

AUTHOR

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Leon Timmermans.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FILE::SLURP::TINY (3) 2015-07-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.