On 2004-09-06, William McKee <[EMAIL PROTECTED]> wrote:
> Hey Mark,
>
> It looks like the plugin bug has bitten you! These look like useful
> additions to the C::A suite. I like the lazy loading and the access
> methods you show in your example. Would it be possible to access the
> config as a hashref?

Currently that's not an option, but it would be easy to adjust it for
that. Do you have a suggestion on who you might like that syntax to
work? Maybe:

=head2 cfg_href()

It works just like cfg(), but returns a hashref instead of the complete
hash.

=cut;

Or heck, it should be possible to detect list or scalar contact
and just Do the Right Thing:

%CFG      = $self->cfg;
$cfg_href = $self->cfg;

> That's what I'm currently doing but prefer your
> solution of reading in multiple config files from a static location (I'm
> loading the config file as a module). 

This should be very much like what you are doing. Just set the last
expression defined to be a hashref

> Also, what is the format of the config file?

Check the documentation for Config::Auto. :) At least with Perl,
there aren't limitations on the complexity of what your hash ref
contains.

        Mark

- 
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   [EMAIL PROTECTED]     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


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

Reply via email to