----- Original Message -----
From: "Doug Hunt" <[EMAIL PROTECTED]>
.
.
>
> It seems that the PDL::SHARE that is used only once is from:
>
> Basic/Core/Core.xs.PL:
>
> /*
> "Publish" pointer to this structure in perl variable for use
> by other modules
> */
>
> sv_setiv(perl_get_sv("PDL::SHARE",TRUE), PTR2IV(&PDL));
>
> But I'm not sure what to do to get around this.
Well spotted. I've managed to create a simple demo script that's in no way
related to PDL:
----------------------------------------
use Inline C => Config =>
BOOT => 'perl_get_sv("x", 1), 17;';
use Inline C=> <<'EOC';
void greet() {
printf("Hello World\n");
}
EOC
greet();
--------------------------------------
Run as 'perl script.pl' and 'perl -Mwarnings script.pl' that script outputs
simply "Hello World" (both perl 5.8 and 5.10).
But running it as 'perl -w script.pl' I also get the warning:
Name "DynaLoader::x" used only once: possible typo at
C:/perl510_M/5.10.0/lib/DynaLoader.pm line 224.
That only happens on 5.10 - on 5.8 there's no warning produced.
Given that the perl code doesn't even mention $x, I believe it could well be
a DynaLoader bug. In addition, I'm surprised to see that, in that demo, $x
is created in package DynaLoader ... but I don't really understand what
ought to be happening.
If no-one here has defninte ideas on how this should be handled, I'll submit
a perlbug report (using the above demo) and see whether p5p want to do
something with DynaLoader that will restore the original troublefree
behaviour. Otherwise we'll have to come up with a change to the PDL source
that removes the annoyance.
Is $PDL::SHARE ever actually used ?
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl