Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

CLI Args and Config Files: Best Practices?

by temporal (Pilgrim)
on Jan 31, 2013 at 22:02 UTC ( #1016403=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use AppConfig qw(:argcount);
    ...
    $temp_conf->args();
    # parse conf file (path specified in CLI args, otherwise use default)
    $temp_conf->file( $temp_conf->config_file() );
    
  2. or download this
    # save the CLI args
    my @CLI = @ARGV;
    ...
    $temp_conf->file( $temp_conf->config_file() );
    # reinforce those CLI args!
    $temp_conf->args(\@CLI);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1016403]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-09-30 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (386 votes), past polls