App::Options: doesn't option_file work?

F

Filippo

I use App::Options to manage the configuratio of my program. The main
program name is main.pl and the cofiguration file main.conf.
Everything works fine for main.pl: if main.conf is present, its
content is used to configure main.pl.

Other than main.pl, I want another program to share the main.conf
configuration file: I want second.pl to use main.conf configurations.

I inserted this into second.pl

use App::Options (
option => {
option_file => "main.conf",
dbname => { default => 'campeggio', },
dbserver => { default => 'localhost', },
printer => { default => 'PDFCreator'},
debug => { default => 0, },
},
);

but, no way. second.pl doesn't use the main.conf information.
Everything works if I copy main.conf to second.conf file. I don't want
to have two separate but identical files for configurations so I'd
want second.pl to use main.conf.

What I have to do?

Thanks,

Filippo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top