Quoting John Lawton <[EMAIL PROTECTED]>:

> --- Mark Stosberg <[EMAIL PROTECTED]> wrote:
> > John,
> > 
> > I think the optimal answer here depends on what kind of user you are
> > targeting to configure the application.
> 
> Good point. In many cases using raw Perl makes perfect sense. I'd also
> like a programming interface to make it possible to update
> configuration parameters from a web-based user interface.

Using something like Config::IniFiles makes this really easy.  Editting the file
manually is really simple (the ini file format is about as easy as it gets), and
making changes from within your code is also easy through the Config::IniFiles
interface.  You can access it as a tied hash which makes it just as easy to work
with as a raw perl file.

If you are using a raw perl file for configuration, and then allowing users to
edit this through a web interface, then you are asking for trouble unless you
are really careful.  You are effectively allowing them to dynamically alter your
code.  It can be done, but it is much safer to use a parseable text file that is
not directly executable.

Cees


> 
> -john
> 
> > 
> > I use a simple ".pm" module that contains regular Perl with comments.
> > This works great for me. Usually I'm just defining "key = value"
> > relations in a %CFG hash. However, in a few cases where I want to do
> > something more complicated, I have the full power of Perl to use, and
> > I
> > know the syntax already. :)
> > 
> > Sometimes I dream of having a web-based configuration tool for
> > applications, which could necessitate having some other config file
> > format, or perhaps storing everything in a database (except the
> > databse
> > connection options...).
> > 
> >   -mark
> > 
> > http://mark.stosberg.com/
> > 
> > ---------------------------------------------------------------------
> > Web Archive:  http://www.mail-archive.com/[email protected]/
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/[email protected]/
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to