Business-Edifact-Interchange

 view release on metacpan or  search on metacpan

lib/Business/Edifact/Interchange.pm  view on Meta::CPAN

package Business::Edifact::Interchange;

use warnings;
use strict;
use 5.010;
use Carp;
use Encode;
use Business::Edifact::Message;

=head1 NAME

Business::Edifact::Interchange - Parse Edifact Messages For Book Ordering

=head1 VERSION

Version 0.07

=cut

our $VERSION = '0.07';

#  UNOA and UNOB "correspond to the basic ascii sets of iso 646 and iso 6937"
# Version 4 of edifact should extend this to unicode
my %encoding_map = (
    'UNOA' => 'ascii',
    'UNOB' => 'ascii',
    'UNOC' => 'iso-8859-1',
    'UNOD' => 'iso-8859-2',
    'UNOE' => 'iso-8859-5',
    'UNOF' => 'iso-8859-7',
);

=head1 SYNOPSIS

This is a support module for EDI ordering modules being developed for the
Koha and Evergreen OS Library Management Systems

    use Business::Edifact::Interchange;

    my $foo = Business::Edifact::Interchange->new();
    $foo->parse($edifact_message);
    or
    $foo->parse_file($filename);
    ...

The standards for using Edifact in Library Book Supply are available from

    www.editeur.org


=head1 SUBROUTINES/METHODS

=head2 new

Create an Business::Edifact::Interchange object

=cut

sub new {
    my $class       = shift;
    my $print_trace = shift;

    my $self = {};

    bless $self, $class;
    return $self;
}

=head2 parse

parse the edifact interchange passed in the message

=cut

sub parse {
    my $self = shift;
    my $doc  = shift;
    $self->{separator} = {
        component => q{\:},
        data      => q{\+},
        decimal   => q{.},
        release   => q{\?},
        reserved  => q{ },



( run in 2.584 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )