Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

CLI Args and Config Files: Best Practices?

by temporal (Pilgrim)
on Jan 31, 2013 at 22:02 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-25 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found