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  -  TEXT::FILTER::COOKED (3)

.ds Aq ’

NAME

Text::Filter::Cooked - Cooked reader for input files

CONTENTS

SYNOPSIS



  use Text::Filter::Cooked;
  my $f = Text::Filter::Cooked->new
    (input => myfile.dat,
     comment => "#",
     join_lines => "\\");

  while ( my $line = $f->readline ) {
      printf("%3d\t%s\n", $f->lineno, $line);
  }



DESCRIPTION

Text::Filter::Cooked is a generic input reader. It takes care of a number of things that are commonly used when reading data and configuration files.
o Excess whitespace (leading and trailing) may be removed automatically. Also, multiple whitespace characters may be replaced by a single blank.
o Empty lines may be ignored automatically.
o Lines that end with a custom defined join symbol, ususally a backslash, are joined with the next line.
o Lines that start with a custom defined comment symbol are ignored.
Text::Filter::Cooked is based on Text::Filter, see Text::Filter.

CONSTRUCTOR

The constructor is called new() and takes a hash with attributes as its parameter.

The following attributes are recognized and used by the constructor, all others are passed to the base class, Text::Filter.
ignore_empty_lines If true, empty lines encountered in the input are ignored.
ignore_leading_whitespace If true, leading whitespace encountered in the input is ignored.
ignore_trailing_whitespace If true, trailing whitespace encountered in the input is ignored.
compress_whitespace If true, multiple adjacent whitespace are compressed to a single space.
join_lines This must be set to a string. Input lines that end with this string (not taking the final line ending into account) are joined with the next line read from the input.
comment This must be set to a string. Input lines that start with this string are ignored.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 106: =over without closing =back
Around line 496: Non-ASCII character seen before =encoding in ’Thies’. Assuming ISO8859-1
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEXT::FILTER::COOKED (3) 2013-01-17

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