Thomas Klausner > Business-DPD > Business::DPD::DBIC

Download:
Business-DPD-0.22.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.22   Source  

NAME ^

Business::DPD::DBIC - DBIc::Class Interface to DPD data

SYNOPSIS ^

  use Business::DPD::DBIC;
  
  my $sqlite_file = Business::DPD::DBIC->path_to_sqlite

DESCRIPTION ^

A DBIx::Class based interface to various data sources needed to generate DPD labels.

METHODS ^

Public Methods

import_data_into_sqlite

    Business::DPD::DBIC->import_data_into_sqlite({
        schema   => 'Business::DPD::DBIC::Schema',
        source   => '/path/to/data',
        connect  => [ DBI connect info ]
    });

Parses the plain text database provided by DPD and stores it into the database used by Business::DPD (which defaults to the build-in sqlite DB)

import_data

    Business::DPD::DBIC->import_data( $schema ,
    {
        source  => '/path/to/data',
    });

Import the plain text data into the <$schema>. Usefull if you want to embed the DB into your own database.

path_to_sqlite

  my $sqlite_file = Business::DPD::DBIC->path_to_sqlite;

Returns the absolute path to the SQLite DB. You most likely won't need this...

generate_sqlite

  Business::DPD::DBIC->generate_sqlite;

Generates a new sqlite DB and fills it with the data included in this dist.

Dies if a DB already exists.

create_table_statements

    my $list_of_create_statements = Business::DPD::DBIC->create_table_statements;

Returns an ARRAYREF consisting of plain text sql statements to create the database. If you want to embed the DB, you might want to munge the values to fit your database.

AUTHOR ^

RevDev <we {at} revdev.at>

SEE ALSO ^

LICENSE ^

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

syntax highlighting: