in reply to Intelligent Package Interaction

I've since stopped passing information around, and now call out to a specific module for the config information

This isn't working out too well though.

I still don't understand how to set things up (or even its its possible) to have the following

MyFramework MyApp1::Config MyApp2::Config

And have MyFramework::Namespace call out the correct MyApp1::Config or MyApp2::Config

Replies are listed 'Best First'.
Re^2: Intelligent Package Interaction
by simonm (Vicar) on Nov 23, 2004 at 14:49 UTC
    Here are the key elements:
    • The code in MyFramework must always refer to a variable (or other registry mechanism) to find the name or reference to use.
    • At startup time (if each process only loads one application) or at the start of each request (if a persistent interpreter serves multiple applications), load the appropriate MyApp modules and store their names or references in the variables/registry.

    It sounds like you've got the first but not the second.

      This will likely sound silly -- but could this be approximated by specifying the configuration info in UNIVERSAL, and having apps look to it in there?
        Sure, but why would you want to do that? Store it in one of your existing packages or create a new one to hold it.