in reply to packages within packages

My solution - which includes some "programming by accident" - is this:
  • Create a package call MRFException which inherits the base class. I can never use this base class because it screws up Error.pm in some way.
  • I then declare MRFException in the script with a use statement. This apparently brings the other packages into the code namespace (... or something ...) and allows the BLOCK used by the try statement to "see" the derived classes I use for exception handling.

    tldr; it's a little bit funky but it seems to work.

  • Replies are listed 'Best First'.
    Re^2: packages within packages
    by Mak3r (Novice) on Jan 23, 2009 at 13:28 UTC
      and thanks for the clarifications. Made me think a little bit deeper.