[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] configuration modules


Jeff MacDonald wrote:
HI,

Currently to load up my config's i have a hash in a .pl file that i just "use"

I"m looking at using one of the config file modules on cpan liek this one

http://search.cpan.org/~wonko/CGI-Application-Plugin-Config-Simple-1.00/lib/CGI/Application/Plugin/Config/Simple.pm

I'm not working in a cached environment at all right now that is, no
mod_perl. I"m wonderng how much extra over head would it be to load up
that config file versus the method i'm using now..

There is some overhead, but the extent depends on how large the file is. If it's pretty small I would imagine the I/O of 'use'ing a file and reading the config would probably be most of the overhead and not the parsing.

C::A::P::Config::Simple is just a simple wrapper around Config::Simple. If you are really concerned I would use Benchmark to create a typical file in both formats (or maybe all 4 formats since Config::Simple supports a very simple syntax, and http based syntax, and a .ini syntax) and then see how they compare. I'd guess the straight hash approach would be the fastest, but by how much, I don't have a clue.

As for why i don't use mod_perl. it's a long story, and i'm working
towards using it in the future.

Well, keep working towards it :)

--
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.