PTools::SDF::CSV - Load "CSV" data file into an PTools::SDF::SDF object


NAME

PTools::SDF::CSV - Load ``CSV'' data file into an PTools::SDF::SDF object


VERSION

This document describes version 0.01, released Feb 15, 2003


DEPENDENCIES

This class depends upon the PTools::SDF::SDF class.


SYNOPSIS

     use PTools::SDF::CSV
     $csvObj = new PTools::SDF::CSV;
 or  $csvObj = new PTools::SDF::CSV( $fileName, $mode, undef, @fieldNames );


DESCRIPTION

The PTools::SDF::CSV class reads and writes files in the ``Comma Separated Values'' format.

  "earth",3,,"moon",1
  "mars",4,,"",
  "jupiter",5,,"callisto",1
  "jupiter",5,,"europa",2
  "jupiter",5,,"ganymede",3

In addition, this class supports the Field Names header that provides a ``Self Defining Format.'' This is implemented by storing names for the fields within each record at the top of the data file.

Constructor

None. This class relies on constructor in the parent class.

Methods

After instantiation, objects of this class behave identically to PTools::SDF::SDF objects.


INHERITANCE

This class inherits from the PTools::SDF::SDF class.


SEE ALSO

See the PTools::SDF::Overview manpage, the PTools::SDF::ARRAY manpage, the PTools::SDF::DB manpage, the PTools::SDF::DIR manpage, the PTools::SDF::DSET manpage, the PTools::SDF::File manpage, the PTools::SDF::IDX manpage, the PTools::SDF::SDF manpage, the PTools::SDF::INI manpage, the PTools::SDF::TAG manpage, the PTools::SDF::Lock::Advisory manpage, the PTools::SDF::Lock::Selective manpage, the PTools::SDF::Sort::Bubble manpage, the PTools::SDF::Sort::Quick manpage and the PTools::SDF::Sort::Shell manpage.


AUTHOR

Chris Cobb, <nospamplease@ccobb.net>

Spliting algorithm, with appreciation, from section titled ``An Introductory Example: Parsing CSV Text'' in Chapter 7, (pg. 204) of ``Mastering Regular Expressions'' by J. Friedl, published by O'Reilly & Associates, Inc., 2ed, Dec, 1998.


COPYRIGHT

Copyright (c) 1997-2007 by Chris Cobb. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

 PTools::SDF::CSV - Load "CSV" data file into an PTools::SDF::SDF object