japhy has asked for the wisdom of the Perl Monks concerning the following question:

I'm on the verge of writing a parser for 867 EDI data (that's "Product Transfer and Resale Report" information in "Electronic Data Interchange" format). I checked CPAN quickly and googled and found no real results.

Does anyone know of a Perl parser for EDI templates? If not, I'll be starting a new branch in CPAN somewhere. Namespace suggestions? Trick is that package names can't be only digits, so ...::EDI::867 won't cut it, and ...::EDI::EDI867 feels clunky.


Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
  • Comment on EDI parsers in Perl (specifically 867 data)?

Replies are listed 'Best First'.
Re: EDI parsers in Perl (specifically 867 data)?
by Roy Johnson (Monsignor) on Dec 07, 2005 at 17:26 UTC
    This works fine:
    package EDI::123; sub here { print "I am in ", __PACKAGE__, "\n"; } package main; EDI::123::here;
    Top-level packages can't start with a digit. But the whole package name is EDI::867, so it doesn't start with a digit.

    Also, creating an EDI directory and an 867.pm file in it, use EDI::867; worked fine.


    Caution: Contents may have been coded under pressure.
Re: EDI parsers in Perl (specifically 867 data)?
by serf (Chaplain) on Dec 07, 2005 at 17:03 UTC
    Would EDI::TS867 or EDI::TransSet867 be appropriate?

    (for "Transaction Set 867")