in reply to Re^5: Undiagnosable Problem
in thread Undiagnosable Problem

You should not have modules using each other in a circular fashion.

Have either Plx use PlxHml or have PlxHml use Plx, but not both.

Replies are listed 'Best First'.
Re^7: Undiagnosable Problem
by dhannotte (Acolyte) on Jan 15, 2017 at 18:49 UTC
    Thanks, Corion, but I'm not sure I understand. Plx needs functions defined in PlxHml, and PlxHml needs functions defined in Plx. How do I implement this?

      Write a third module, PlxCommon.pm, and move all functions there that Plx and PlxHml need.

        I was afraid you were going to say that :)

        I might as well move ALL code into Plx.pm, then, and just always use that all my scripts.

        This is disappointing because I like to separate code into libraries for solely administrative reasons. When I'm working on Language Services, for instance, I think about a set of concepts common to all linguistic functions. Even if there are no global variables, it helps if all references to space available on a disk is always called SpaceAvailable rather than some being called SpaceAvailable and others called AvailableSpace.

        Is there any way in Perl to segregate collections of functions this way, or must they always be lumped into a single master library?