Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > App::Options: doesn't option_file work?

Reply
Thread Tools

App::Options: doesn't option_file work?

 
 
Filippo
Guest
Posts: n/a
 
      02-26-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments