In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] wrote:

> Okay, this is really, really sloppy, but it's much closer in intent to what Randal 
>was talking
> about (only relevant code is presented):

> sub doConf
> {
>     my ($conf, $directives, $config_data) = @_;
>     while (($directive, $config_info) = each(%{$directives}))
>     {
>         my ($value) = $conf->get($directive);
>         if (defined($value))
>         {
>             $config_data->{ $config_info } = $value;
>             print "$config_data->{ $config_info } = $value\n";
>         }
>     }
>     return $config_data;
> }


why not simply use a configuration module?  objects simplify this process
a great deal.  see ConfigReader::Simple, for instance.
-- 
brian d foy <[EMAIL PROTECTED]> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to