NAME

Text::CSV::Piecemeal

WARNING

This module is in early development and may change.

SYNOPSIS

$csv = Text::CSV::Piecemeal->new( { sep_char => ',' } );

DESCRIPTION

This module provides a simple wrapper around Text::CSV to allow creation of a csv bit by bit.

This is a work in progress and contains incomplete test code, methods are likely to be refactored, you have been warned.

METHODS

new( \%args )

Create new Piecemeal object takes a hashref of args to pass to Text::CSV ( currently only sep_char )

If no args provided defaults are applied:
sep_char => ","

push_value( $value )

Pushes the provided value to the next cell, will close the previous cell if it has data but has not been closed

Closes itself the next operation will be on the next cell, if you need to append to this use push_partial_value instead.

push_partial_value( $value )

Concatinates the provided value to the current cell

end_partial_value

Close the current partial value so next operation is on next cell

push_row( @values )

Takes an array of values, starts a new row containing these values and closes the row

end_row

Close the current row, next operation will start a new row.

output

Converts stored data into csv as a single string and returns it.	

SOURCE CODE

The source code for this module is held in a public git repository on Gitlab https://gitlab.com/rnewsham/text-csv-piecemeal

LICENSE AND COPYRIGHT

Copyright (c) 2018 Richard Newsham

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

BUGS AND LIMITATIONS

See rt.cpan.org for current bugs, if any.

INCOMPATIBILITIES

None known.

DEPENDENCIES

Text::CSV