Are there other (better?) ways to achieve this, any problems with using "our" in this way?
No, that seems a pretty standard way to do it.
A couple of small points with your code tho':
- Names in all lower case are usually saved for "pragmatic" modules - i.e. those that change the way the program executes (like strict and warnings). You'd probably be better advised to call it YourAppName::Config.
- Your shebang line looks broken. Shouldn't it be /usr/bin/perl (with a leading '/')?
- If you have "use warnings" then you no longer need '-w'.
--
<
http://www.dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg