Doug MacEachern wrote:

> On Mon, 17 Sep 2001, Stas Bekman wrote:
> 
> 
>>OK, using the patch I've just sent for auto-mkpath and using all the
>>latest patches, makes the perlrequire test short and sweet:
>>
> 
> looks good, but i would fold the duplicated code into something like this:
> 
> my %require_tests = (
>     main => 'Loaded by Parent',
>     vh   => 'Loaded by VirtualHost',
> );
> 
> while (my($test, $magic) = each %require_tests) {
>      my $mod = <<EOF;
> package My::PerlRequireTest;
> \$My::PerlRequireTest::MAGIC = '$magic';
> 1;
> EOF
>      my $dir  = catfile $target_dir, $test;
>      my $file = catfile $dir, 'PerlRequireTest.pm';
>      $self->writefile($file, $mod, 1);
> }


mucho mejor!


> and i could imagine another implementation where APACHE_TEST_CONFIGURE is
> inherited to do this ;-)


OK, if you insist, now it's a time to write a PerlModule test. So should it be:


package TestDirective::perlmodule;
@TestDirective::perlmodule::ISA = qw(TestDirective::perlrequire);
1;

:)






-- 


_____________________________________________________________________
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]

Reply via email to