http://www.perlmonks.org?node_id=526566


in reply to Re^2: Configuration Best Practices for Web Apps
in thread Configuration Best Practices for Web Apps

I would use a class method rather than a package variable. No need to expose that.

For handling the application scoped and machine scoped configs, I would make it possible to access both through a single object. You might make an application config class that subclasses the machine config class, or you might just have a class that always reads the machine config file in addition to the app config file and merges them internally (i.e. there is no API for accessing the machine config outside of an application context).