App::Options: doesn't option_file work?

Discussion in 'Perl Misc' started by Filippo, Feb 26, 2007.

  1. Filippo

    Filippo Guest

    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
     
    Filippo, Feb 26, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cliff  Martin
    Replies:
    1
    Views:
    3,057
    Larry Smith
    Jan 31, 2007
  2. jacksu
    Replies:
    0
    Views:
    530
    jacksu
    Oct 9, 2007
  3. Utkado
    Replies:
    2
    Views:
    2,168
  4. Greg Hauptmann
    Replies:
    1
    Views:
    182
    Brian Candler
    Oct 30, 2008
  5. BrianP
    Replies:
    2
    Views:
    293
Loading...

Share This Page