Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: (2) Parsing external config file (variable interpolation in config file?)

by BoredByPolitics (Scribe)
on Jan 21, 2001 at 20:22 UTC ( [id://53338]=note: print w/replies, xml ) Need Help??


in reply to Re: (2) Parsing external config file (variable interpolation in config file?)
in thread Parsing external config file

Yes!

You can define 4 types of config variable -

  • Boolean ("varname!")
  • Scalar ("varname=s")
  • Array ("varname=@")
  • Hash ("varname=%")
So your line enable pass $newen would be best handled as a hash, which would be called enable.

[section] has the effect of prefixing the varname with the section name, so login would become SetPass_login.

Multiple assignments to the same array or hash add further elements.

Both environment varibles, and those previously defined in the config file, can be expanded as values.

Take a look at the pods for AppConfig::State and AppConfig::File for more details.

Overall I'm very impressed with this module - it has definately saved me alot of time with the program I'm currently writing.

Pete

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-03-29 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found