<<

NAME

Koha::Edifact::Segment - Class foe Edifact Segments

DESCRIPTION

 Used by Koha::Edifact to represent segments in a parsed Edifact message

METHODS

new

     my $s = Koha::Edifact::Segment->new( { seg_string => $raw });

     passed a string representation of the segment,  parses it
     and retums a Segment object

tag

     returns the three character segment tag

elem

      $data = $s->elem($element_number, $component_number)
      return the contents of a specified element and if specified
      component of that element

element

      syntactic sugar this wraps the rlem method in a fuller name

as_string

      returns a string representation of the segment

_parse_seg

   passed a string representation of a segment returns a hash ref with
   separate tag and data elements

_get_elements

   passed the data portion of a segment, splits it into elements, passing each to
   components to further parse them. Returns a reference to an array of
   elements

_components

   Passed a string element splits it into components  and returns a reference
   to an array of components, if only one component is present that is returned
   directly.
   quote characters are removed from the components

de_escape

   Removes Edifact escapes from the passed string and returns the modified
   string

AUTHOR

   Colin Campbell <colin.campbell@ptfs-europe.com>

COPYRIGHT

   Copyright 2014,2016, PTFS-Europe Ltd
   This program is free software, You may redistribute it under
   under the terms of the GNU General Public License

<<