[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5638] trunk/LedgerSMB/X12.pm
- Subject: SF.net SVN: ledger-smb:[5638] trunk/LedgerSMB/X12.pm
- From: ..hidden..
- Date: Wed, 30 Jan 2013 09:46:08 +0000
Revision: 5638
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5638&view=rev
Author: einhverfr
Date: 2013-01-30 09:46:08 +0000 (Wed, 30 Jan 2013)
Log Message:
-----------
Adding manual override for segment separators
Modified Paths:
--------------
trunk/LedgerSMB/X12.pm
Modified: trunk/LedgerSMB/X12.pm
===================================================================
--- trunk/LedgerSMB/X12.pm 2013-01-30 09:40:17 UTC (rev 5637)
+++ trunk/LedgerSMB/X12.pm 2013-01-30 09:46:08 UTC (rev 5638)
@@ -161,6 +161,23 @@
return $parser;
}
+=item set_segment_sep(char $sep)
+
+In certain cases, people have been known to generate EDI files using illegal
+characters as separators, or otherwise have EDI files where the parser cannot
+properly define the segment separator (the element separator poses no such
+problems).
+
+In these cases one needs to set it manually. Use this function to do this.
+
+=cut
+
+sub set_segement_sep {
+ my ($self, $sep) = @_;
+ # ick, ai don't like how this involves messing around with internals.
+ $self->parser->{_SEGMENT_SEPARATOR} = $seg;
+}
+
=back
=head1 COPYRIGHT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.