Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Ways of Passing Configuration Parameters

by DrZaius (Monk)
on Jun 08, 2001 at 08:37 UTC ( [id://86843]=note: print w/replies, xml ) Need Help??


in reply to Ways of Passing Configuration Parameters

If you want to configure on the command line, which I think you are trying to do, take a peak at Getopt::Long.

It does the dash stuff for you, and can also handle multi valued arguments (--foo=bar --foo=monkey)

Cheers.

Replies are listed 'Best First'.
Re: Re: Ways of Passing Configuration Parameters
by John M. Dlugosz (Monsignor) on Jun 08, 2001 at 19:25 UTC
    No, it's not specified on the command line. It's a data declaration in a file. See the node referenced in the original note for details one what it's for.

    I thought about using Getopt::Long anyway, but don't know if I can make it look at an array other than @ARGV.

      I'm not sure that Getopt::Long is the right tool for the job here, but if you want to use it, localize @ARGV and assign your array of configuration parameters to @ARGV before making a call to Getopt::Long. There's some code and discussion of this here.

      ----
      Coyote

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://86843]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-18 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found