Hello!

I am new to Mason and have a little problem in having the same application (but with different configuration) multiple times on a server in different paths.
Think the problem is because of the global scope of packages.

I have the configuation data in a package - lets say MyConfig.

e.g.
package MyConfig;

sub getColor
{
    return "red";
}

1;

I load it in the autohandler and via MyConfig::getColor () it is available in all parts of the application.

Lets say I wanna have the same application a 2nd time on the same server but with a different color.
So both applications would have the same files but MyConfig.pm differs.

That does not work. The color get mixed up unless I do not have unique names for the config-package (e.g. MyConfig1 in the 1st application and MyConfig2 in the 2nd) again. Thats not great because I also need to change every appearence of MyConfig::getColor () to the new name.

Is there a way I can bring such static configuration data in the application in a more elegant way?

Thanks for help!
Chris


_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to