OK, so now when bootstrapping is available I'm trying to require all .pm
files in ./t and search for Apache_TEST_CONFIGURE and run it if found.
Index: Apache-Test/lib/Apache/TestConfigPerl.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.22
diff -u -r1.22 TestConfigPerl.pm
--- Apache-Test/lib/Apache/TestConfigPerl.pm 2001/09/06 05:16:25 1.22
+++ Apache-Test/lib/Apache/TestConfigPerl.pm 2001/09/10 09:53:50
@@ -245,12 +245,21 @@
my @args;
my $pm = $_;
- my $module = catfile $File::Find::dir, $pm;
- $self->add_module_config($module, \@args);
- $module = abs2rel $module, $dir;
+ my $file = catfile $File::Find::dir, $pm;
+ $self->add_module_config($file, \@args);
+ my $module = abs2rel $file, $dir;
$module =~ s,\.pm$,,;
$module = join '::', splitdir $module;
+ require $file;
+ {
+ no strict 'refs';
+ my $configure_sub = *{$module."::APACHE_TEST_CONFIGURE"}{CODE};
+ if (defined $configure_sub) {
+ eval {$self->$configure_sub};
+ warn $@ if $@;
+ }
+ }
my($base, $sub) =
map { s/^test//i; $_ } split '::', $module;
require of some test files fails:
----------
TestModules::cgiupload barks at Apache::OK undefined, patched with:
+use Apache::Const -compile => 'OK';
----------
t/response/TestAPI/aplog.pm barks at Apache::LOG_MARK undefined,
I don't know how to make it available at require() time. We explicitly
don't import the APLOG_MARK from Apache headers, but then I cannot find
where it's done. I have found this:
./xs/maps/modperl_functions.map:DEFINE_LOG_MARK | MPXS_Apache_LOG_MARK | ...
and these are autogenerated:
./xs/Apache/Log/Apache__Log.h:static XS(MPXS_Apache_LOG_MARK)
./WrapXS/Apache/Log/Log.xs: cv = newXS("Apache::LOG_MARK", MPXS_Apache_LOG_MARK,
__FILE__);
where is the code that does return (__FILE__, __LINE__) ?
----------
t/response/TestAPI/send_fd.pm doesn't have SERVER_ERROR and NOT_FOUND
defined, cured with:
use Apache::compat ();
+use Apache::Const -compile => ':common';
---------
t/response/TestAPI/sendfile.pm doesn't feach APR::SUCCESS, fixed with:
+ use Apache::Const -compile => ':common';
+ use APR::Const -compile => 'SUCCESS';
since other constants weren't there too, but it didn't complain about
these.
---------
t/filter/TestFilter/input_body.pm seem not to have attributes inherited
via require()
Invalid CODE attribute: FilterRequestHandler at
/home/stas/apache.org/registry/t/filter/TestFilter/input_body.pm line 15
---------
I've stopped here... cannot get through the last one.
also, does ModPerl::Const::compile accepts only a single arg in the
string on purpose? e.g. it's not possible to say: -compile 'foo bar';
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]