NAME

Text::CSV_PP::Simple - Simpler parsing of CSV files [PP version]

SYNOPSIS

    use Text::CSV_PP::Simple;
    my $parser = Text::CSV_PP::Simple->new;
    my @data = $parser->read_file($datafile);
    print @$_ foreach @data;

    # Map the fields to a hash?
    my $parser = Text::CSV_PP::Simple->new;
    $parser->field_map(qw/id name null town/);
    my @data = $parser->read_file($datafile);

DESCRIPTION

Text::CSV_PP::Simple simply provide a little wrapper around Text::CSV_PP to streamline the
common case scenario.

METHODS

    new

        my $parser = Text::CSV_PP::Simple->new(\%options);

        Construct a new parser. This takes all the same options as Text::CSV_PP.

    field_map

    	$parser->field_map(qw/id name null town null postcode/);

        Rather than getting back a listref for each entry in your CSV file, you
        often want a hash of data with meaningful names. If you set up a field_map
        giving the name you'd like for each field, then we do the right thing
        for you! Fields named 'null' vanish into the ether.

    read_file

	    my @data = $parser->read_file($filename);

        Read the data in the given file, parse it, and return it as a list of
        data.

        Each entry in the returned list will be a listref of parsed CSV data.

AUTHOR

Kota Sakoda  C<< <cohtan@cpan.org> >>

SEE ALSO

Text::CSV_XS, Text::CSV_PP, Text::CSV::Simple

COPYRIGHT AND LICENCE

Copyright (C) 2007, Kota Sakoda

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