We don't bite newbies here... much | |
PerlMonks |
Using packages to store global configuration varsby fuzzyping (Chaplain) |
on Sep 06, 2009 at 03:57 UTC ( [id://793740]=perlquestion: print w/replies, xml ) | Need Help?? |
fuzzyping has asked for the wisdom of the Perl Monks concerning the following question: I've written a small cgi application that runs via mod_perl. In order to keep the main script maintainable, I want to move all of the global user settings to a separate file. I'd like to make it a perl package so that visitors are unable to read the file directly. My first attempt was to move the vars into a new Config.pm file and call it from within my mod_perl startup.pl file. Unfortunately, it appears that the variables are not being imported to my namespace. Any suggestions on how to fix this (or do it better)? The tail end of my startup.pl:
Example from Config.pm:
Error from webserver:
Line 13 from index.cgi:
-fp
Back to
Seekers of Perl Wisdom
|
|