On Thu, Jan 06, 2005 at 09:21:44PM -0500, Randy W. Sims wrote:
> Randy W. Sims wrote:
> >The test file below is pared down from Module::Build. The warning from
> >C<require> comes up in several tests, not always causing test failures.
> >The same warning appears if you run MakeMaker as shown in the
> >Devel::Cover docs--it's not specific to Module::Build.
> >
> >
> >[EMAIL PROTECTED]:~/projects$ module-starter --eumm --mb --module Foo
> >Created starter directories and files
> >
> >[EMAIL PROTECTED]:~/projects$ cd Foo
> >
> >[EMAIL PROTECTED]:~/projects/Foo$ rm MANIFEST t/*
> >
> >[EMAIL PROTECTED]:~/projects/Foo$ cat > t/basic.t
> >use Test::More tests => 1;
> >use File::Spec;
> >require File::Spec->catfile('t', 'common.pl');
>
> As a workaround, I've checked in changes from the last line above to:
>
> my $common_pl = File::Spec->catfile('t', 'common.pl');
> require $common_pl;
>
> which seems to work fine.
And I have checked in the following fix which will be in the next
release:
=== Cover.xs
==================================================================
--- Cover.xs (revision 62)
+++ Cover.xs (revision 63)
@@ -846,7 +846,7 @@
case OP_REQUIRE:
{
dSP;
- sv_setsv(MY_CXT.module, TOPs);
+ SvSetSV_nosteal(MY_CXT.module, TOPs);
NDEB(D(L, "require %s\n", SvPV_nolen(MY_CXT.module)));
break;
}
Thanks for the report and sorry for the delay fixing it, and that you
needed to provide a workaround.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net