On Thu, 2003-12-11 at 11:01, Stas Bekman wrote:
> > Yes, and I am planning on writing 2 subclasses to Apache::PerlSections
> > to handle either a namespace name, or a hash ref, as in:
> > 
> > package My::Config;
> > $Location{'/foo'} = { [...] };
> > @Alias = qw(/this /that);
> >  and
> > Apache::PerlSection->add_namespace("My::Config");
> > 
> >  or
> > 
> > my %My::Config = (
> >     'Location' => { '/foo' => { [...]}},
> >     'Alias' => qw(/this /that),
> > );
> >  and
> > Apache::PerlSection->add_hash(\%My::Config);
> 
> ah, it can be an array or a scalar too, so a more generic name would be a 
> better choice, I believe. just call it add()? or add_var()?
> 
> Also if you prototype add() to accept an SV, you won't need to pass a 
> reference, which is confusing in the case of a scalar.

Yes, I do like the sound of Apache::perlSection->add_[type]()

> In which case we may want to provide an equivalent to add_config() as well. 
> Since they all add config. e.g. have:
> 
> Apache::PerlSection->add_namespace("My::Config");
> Apache::PerlSection->add_string("User $foo");
> my %hash = ...;
> Apache::PerlSection->add(%hash);

Might as well accept this as well:

Apache::PerlSection->add_glob(\*My::Config);

> notice that add_string is exactly the same as $s->add_config.

I'll put this thread in todo/ and push it on my stack ;-)

> __________________________________________________________________
> 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
-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to