On Mon, 10 Sep 2001, Stas Bekman wrote:

> +                my $configure_sub = *{$module."::APACHE_TEST_CONFIGURE"}{CODE};

would prefer using $module->can('APACHE_TEST_CONFIGURE') here.

> TestModules::cgiupload barks at Apache::OK undefined, patched with:
> 
> +use Apache::Const -compile => 'OK';

yeah, the common ones normally compiled in modperl_startup.pl
 
> ----------
> 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__) ?

Apache__Log.h:
        EXTEND(SP, 2);
        PUSHs_mortal_pv(CopFILE(cop));
        PUSHs_mortal_iv(CopLINE(cop));

you can do something like:
unless (defined &Apache::LOG_MARK) {
     *Apache::LOG_MARK = sub { #get file/line using caller() }
}
 
> ---------
> 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

and similar:
unless (defined &Apache::Filter::MODIFY_CODE_ATTRIBUTES) {
    ...
}
 
> 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';

why should it be possible?  Exporter.pm doesn't support that.  just use
the standard calling convention:
-compile => qw(foo bar);

i'm starting to think supporting APACHE_TEST_CONFIGURE is going to be more
trouble than its worth.  it is also going to slow things down having to
require/compile every .pm on the client side before running tests.
the majority of .pm tests will not have an APACHE_TEST_CONFIGURE.
i'd rather see, if possible, the .t files that need setup of
directories/files use your new Apache::TestUtil functions instead.
what do you think?




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

Reply via email to