httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: MM_Unix changes in bleedperl
Date Thu, 11 Apr 2002 18:01:45 GMT
Geoffrey Young wrote:
> (sorry if this pops up twice - I've been having subscription problems due to
> a change in my outgoing email address)

I did adjust the import method in TestMM recently (because it didn't 
work across many Makefiles), but why do you call ->clean? You want to 
import this method for Makemaker to pick it up, so you either do:

use Apache::TestMM qw(clean);

or

require Apache::TestMM;
Apache::TestMM->import('clean');

or


use Apache::TestMM;
*MY::clean = \&Apache::TestMM::clean;

e.g. that's the code that I use in external projects:

use constant HAS_APACHE_TEST => eval {require Apache::Test};
# enable 'make test|clean'
if (HAS_APACHE_TEST) {
     require Apache::TestMM;
     Apache::TestMM->import(qw(test clean));
}
...

> hi all...
> 
>   just recently the Makefile.PL I've been using as a template for
> Apache::Test started failing under bleedperl.
> 
> here's the error:
> 
> Can't use string ("Apache::TestMM") as a HASH ref while "strict refs" in use
> at /src/bleedperl/lib/5.7.3/ExtUtils/MM_Unix.pm line 352.
> 
> my Makefile.PL is listed below.
> 
> I really can't remember why I was calling Apache::TestMM->clean in the first
> place, which is the call that produces the error.  is that call necessary
> any more?  with older perls, where the call succeeds, the generated Makefile
> is the same both with and without it.
> 
> sorry I'm foggy as hell these days...
> 
> --Geoff
> 
> use ExtUtils::MakeMaker;
> 
> WriteMakefile(
>     'NAME'              => 'Cookbook::TestMe',
>     'VERSION_FROM'      => 'TestMe.pm',
> );
> 
> sub MY::test {
>   if (eval "require Apache::TestMM") {
>     Apache::TestMM::generate_script('t/TEST');
>     Apache::TestMM->clean;
>     return Apache::TestMM->test;
>   }
> 
>   # The whitespace in front of @echo MUST be a single tab!
>   return <<'EOF';
> test::
> 	@echo This test suite requires Apache::Test
> 	@echo available from the mod_perl 2.0 sources
> 	@echo or the httpd-test distribution.
> EOF
> }



-- 


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


Mime
View raw message