NAME

Text::CSV::BulkData - generate csv file with bulk data

SYNOPSIS

use Text::CSV::BulkData;

my $output_file = "/your/dir/example.dat";
my $format = "0907000%04d,JPN,160-%04d,type000%04d,0120444%04d,20080418100000\n";

my $gen = Text::CSV::BulkData->new($output_file, $format);

my $pattern_1 = [undef,'*2','-2','*2+1'];
$gen->initialize
    ->set_pattern($pattern_1)
    ->set_start(1)
    ->set_end(3)
    ->make;
my $pattern_2 = [undef,'/10','*3/2','%2'];
$gen->set_pattern($pattern_2)
    ->set_start(8)
    ->set_end(10)
    ->make;

This sample generates following csv file.

09070000001,JPN,160-0002,type0000000,01204440003,20080418100000
09070000002,JPN,160-0004,type0000000,01204440005,20080418100000
09070000003,JPN,160-0006,type0000001,01204440007,20080418100000
09070000008,JPN,160-0000,type0000012,01204440000,20080418100000
09070000009,JPN,160-0000,type0000013,01204440001,20080418100000
09070000010,JPN,160-0001,type0000015,01204440000,20080418100000

DESCRIPTION

Text::CSV::BulkData is a Perl module which generates csv files with bulk data.

You can modify incremented values with using addition(+), subtraction(-), multiplication(*), division(/) and residue(%). Precedence of operators is '*', '/', '%', '+', '-'. The right of the decimal point are truncated.

SEE ALSO

None

AUTHOR

Kazuhiro Sera, <webmaster@seratch.ath.cx>

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Kazuhiro Sera

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.