- Some errors related to file handling have been fixed. Versions 0.50
and 0.60 were impacted. get_next_pos_loop, get_next_pos_level_loop,
print_tree were impacted.
The error was as a result of calling readline() on a closed file
handle.
- The pods have been better formatted.
- Attention: users of previous version
parse_file() has been renamed to parsefile().
parsefile ( file => $file, conf => $conf );
Users using the parse() methods to parse a X12 file should
now use the parsefile() method.
- Attention: users of previous version
parse() method signature has changed.
new signature is parse ( handle => $handle, conf => $conf );
takes an already open file handle as input.
- closefile() method is added.
If you do not parse the entire X12 file using get_next_loop()
method, then it is recommended that you call closefile() to
close the file being parsed.
- Many improvements (almost a rewrite) have gone into this version.
Most of the interfaces have been kept the same except some spell corrections.
- New class X12::Parser::Tree has been added. Earlier the X12::Parser::Cf
class was used to read the cf file as well as maintain the information in
object form. Now they are separated out. X12::Parser::Tree simplifies the
representation of cf file in object format and is a much cleanser approach.
- X12::Parser::Cf has been rewritten. Old goto statements are gone.
- X12::Parser module is rewritten. As a result of X12::Parser::Tree, the
X12::Parser module is now much more readable and uses a cleaner approach.
It can handle segment separators of the for ~, ~LF, ~CRLF.
- New method get_subelement_separator() is added.
- Spelling correction from seperator to separator is done.
- Additional test files for the new modules.
- Added new method parse_file, replacement to parse. The parse()
method in the future will be used for file handles.
- Package Level variables in both the Parser.pm and Cf.pm module have
been removed. This would allow a user to call the parse method on multiple
files using same/different config files.
- Removed warnings that appeared when a end of the X12 file was reached.
A whole lot of changes have gone into this version.
The X12::Parser can now handle files of any size. The earlier versions
of the parser relied on reading the whole X12 file into an array before
parsing. X12::Parser can handle files with multiple ISA segments having
different segment seperators (note it cannot handle different transaction
types within the same file).
- _parse() method is split into 2 functions parseloop_start() and
parseloop(). Instead of loading the whole file into an array the file
is read as it is being parsed. parseloop_start() and parseloop()
could have been handled within the same function but have kept it
seperate for simplicity. parseloop_start() detects start of loops.
parseloop() return the loop segments.
- setseperator() function is added. This function sets the segment
seperator and element seperator.
- get_segments() function is removed. Since we no longer maintain the
whole file in an array, it is difficult to gets the segments in a loop
just by giving the line number where the loop starts.
- reset_pos() function is removed. Not really used and also now that
we parse the file serially there is no need for this function.
- get_loop_segment() no longer needs $loop as input.
- Changes to man page section of the module to reflect the above changes.
- get_next_pos_loop(), and get_next_pos_level_loop() return segment positions
starting with 1. In previous versions 0 would correspond to the first segment.
- Moved getlevel_one and getnext_level functions from
Parser.pm to Cf.pm (the new functions in Cf.pm are called
get_level_one and get_next_level). This keeps configuration
related functions within the Cf.pm module.
- Moved $self members/elements to file globals.
- Changed $c_L to $current_level and $s to $element_seperator
- Added $segment_seperator. Added get_segment_seperator() and
get_element_seperator() functions. Modified $line_seperator to
$orig_line_seperator
- Fixed problem with parser running out of memory.
Still has issue with very large files.
- First release