Geoffrey Young wrote:

Stas Bekman wrote:

David Wheeler wrote:


On Jan 28, 2004, at 2:21 PM, Stas Bekman wrote:


Then for now I'll just use:

my $serverroot = Apache::Test::config()->{vars}>{serverroot};


the idea is to get away from that - it's way too verbose to be conventient.

OK

AUTOLOAD is okay with me. It's a nice way of getting everything, even
if things change in the future.


Or we can just add

sub Apache::Test::serverroot { Apache::Test::config->{vars}{serverroot}; }

to start with, if Geoff is unhappy about AUTOLOAD. then we could expand
it to add a few more shortcuts for usefull config directives. I'm not
sure whether they should be exportable though.


whatever is fine - AUTOLOAD was an idea, as was exporting variables.  in the
end it really doesn't matter much.

As it shows I need sleep on things to get things "right". I now think that a raw AUTOLOAD, mapping $AUTOLOAD to Apache::Test::config()->{vars}->{$AUTOLOAD}, is a bad idea, because if left wide open we commit to internal config API which we won't be able to change later. So we should either add explicit subs mapping to the config arguments that we are ready to commit to in the public API, or do the same with AUTOLOAD, but only for a selected set of config vars. I'll scan our tests to see which other vars we frequenty use and add a wrapper for these.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to