The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DataFlow::Proc::DBF - A dBase DBF converting processor

SYNOPSIS

    use DataFlow;

    # creating our flow
    my $flow = DataFlow->new([
       [ 'DBF' => { direction => 'CONVERT_FROM' } ],
    ]);


    # getting back a perl arrayref
    my $perl_struct = $flow->process( $slurped_dbf_data );


  

DESCRIPTION

This module provides a processing step for dBase (DBF) files under DataFlow. It lets you CONVERT_FROM a DBF file into a Perl data structure (in this case, an array reference) and CONVERT_TO a DBF stream, from a Perl array reference (the stream can be saved into a file for later inspection with dBase).

OPTIONS

direction

  • CONVERT_FROM

    Converts FROM a DBF stream or file into a Perl array reference.

  • CONVERT_TO

    Converts TO a a DBF stream or file, from a Perl array reference.

header_wanted

Saves the header of the structure into $proc->header. You can reach it via $flow->procs->[ $i ]->header, where $i is the index of the DBF processor in your flow. For example:

  my $flow = DataFlow->new([
      [ 'DBF' => { direction => 'CONVERT_FROM', header_wanted => 1 } ],
  ]);

  my $perl_data = $flow->process( $dbf_data );
  my $header    = $flow->procs->[0]->header;

dbf_opts

  my $flow = DataFlow->new([
     [ 'DBF' => {
         direction => 'CONVERT_FROM',
         dbf_opts  => { name => 'dbase.dbf' },
       }
     ],
  ]);

Sets any particular option you may want to pass to XBase. The most important one being name, in which you can specify a file name for either input (CONVERT_FROM) or output (CONVERT_TO).

DIAGNOSTICS

Error creating DBF: $MESSAGE

The conversor was unable to create a DBF file with the provided structure. Make sure you pass a matrix with lines containing the same number of elements.

CONFIGURATION AND ENVIRONMENT

DataFlow::Proc::DBF requires no configuration files or environment variables.

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-dataflow-proc-dbf@rt.cpan.org, or through the web interface at http://rt.cpan.org.

SEE ALSO

DataFlow, XBase

AUTHOR

Breno G. de Oliveira <garu@cpan.org>

LICENCE AND COPYRIGHT

Copyright (c) 2011, Breno G. de Oliveira <garu@cpan.org>. All rights reserved.

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

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.