### Shared config info -- "machine scope" ### # A local module that loads the shared config info. # Is there a way to pass in a project name in a 'use' # that is mod_perl safe? use My::LocalConfig qw(project_name); ### App-specific config info -- "machine scope" ### # Assuming 'config_path' is a function exported by the LocalConfig module. # Or should it just set a variable? # What sort of variable and where can it be set so it's ready when # the require runs? # Would a 'do' be better? # Should the project_name be passed in here as a parameter? require config_path . "/my_config.pl"; # Or should we use a Config module here? # Do various config modules allow a function call when you set # the path? # Are there Config modules that allow some logic in them? # We have several cases where we set # variables differently based on dev, QA, or prod environments. ### Session config info -- "session scope" ### # A module that just grabs relevant $ENV info and # provides it via a method or methods. use My::SessionConfig; # then my $session = My::SessionConfig->new(); my $current_userid = $session->current_user();