Text::CSV::SQLhelper - Processes a CSV file and tries to figure out
Version 0.0.0
This is the text CSV object.
If no null is found,
It defaults to false.
Returns the current error code and true if there is an error.
If there is no error, undef is returned.
my $error=$foo->error; if($error){ print 'error code: '.$error."\n"; }
Returns the error string if there is one. If there is not, it will return ''.
my $error=$foo->error; if($error){ print 'error code:'.$error.': '.$foo->errorString."\n"; }
This processes the specified file.
Two arguements are required. The first one is the file to read and the second one is a boolean specifying if the top line should be skipped or not.
The returned value is a array.
Wether or not a column can have a null value.
This defaults to false.
This is the smallest value found. In regards to strings, it represents number of characters in the shortest string.
This is the largest value found. In regards to strings, it represents number of characters in the longest string.
This is a SQL description for the column.
This is the data type of the column.
The possible values are 'float', 'int', and 'string'.
#process the file, including the top line my @columns=$foo->processFile($file); if($foo->error){ print 'error code:'.$foo->error.': '.$foo->errorString."\n"; } #process the file, skipping the top line my @columns=$foo->processFile($file, 1); if($foo->error){ print 'error code:'.$foo->error.': '.$foo->errorString."\n"; }
This blanks the error storage and is only meant for internal usage.
If a permanent error is set, it will not be cleared.
It does the following.
$self->{error}=undef; $self->{errorString}="";
No "Text::CSV" object specified or defined.
No file specified.
Failed to open the file.
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-text-csv-sqlhelper at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-CSV-SQLhelper. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-text-csv-sqlhelper at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Text::CSV::SQLhelper
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-CSV-SQLhelper
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Text-CSV-SQLhelper
CPAN Ratings
http://cpanratings.perl.org/d/Text-CSV-SQLhelper
Search CPAN
http://search.cpan.org/dist/Text-CSV-SQLhelper/
Copyright 2010 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::CSV::SQLhelper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::CSV::SQLhelper
CPAN shell
perl -MCPAN -e shell install Text::CSV::SQLhelper
For more information on module installation, please visit the detailed CPAN module installation guide.