On Sun, 2003-03-02 at 12:31, Stas Bekman wrote:
Philippe M. Chiasson wrote:
Another <Perl > section backwards-compatibility item on the TODO list.
Perl $Apache::Server::SaveConfig = 1
in httpd.conf will retain all the code of the <Perl > sections, otherwise, the whole namespace is whiped (modperl_clear_symtab) stolen from mp1
Great, Philippe! A few minor comments:
[snip] also needs to be added to xs/tables/current/ModPerl/FunctionTable.pm
BTW, what's the state on the source scanner nowadays ?
I don't think anything has changed. It was broken for me for a long time and since then I was manually adding the new functions.
Gerald Richter hasn't popped up here for a long time, I don't know what's the status of his WrapXS generalization project. I remember he had a better scanner, based on Parse::RecDescent.
Finally, for this feature we actually could have a test, with a simple regex just to test that the config is actually there.
Turned out like a very good idea to do that. Turns out the simple logic for SaveConfig was backwards ;-(
;)
Following is a patch of better quality...
+1, just one comment re: test
Index: t/response/TestDirective/perldo.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perldo.pm,v
retrieving revision 1.1
diff -u -I'$Id' -I'$Revision' -r1.1 perldo.pm
--- t/response/TestDirective/perldo.pm 7 Oct 2002 02:35:18 -0000 1.1
+++ t/response/TestDirective/perldo.pm 3 Mar 2003 08:51:16 -0000
@@ -10,9 +10,13 @@
sub handler {
my $r = shift;
- plan $r, tests => 1;
+ plan $r, tests => 3;
ok t_cmp('yes', $TestDirective::perl::worked);
+ + ok not exists $Apache::ReadConfig::Location{'/perl_sections'};
+ + ok exists $Apache::ReadConfig::Location{'/perl_sections_test'};
could we have one more test:
use Apache::TestUtil;
my $config = $Apache::ReadConfig::Location{'/perl_sections_test'};
ok t_cmp(qr/something/, $config, "matching something");assuming that you can have qr/something/ that will much on all possible platforms and machines? see what I mean?
__________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
