Rob:  Thats interesting!

I don't know how to fix this problem, but I'm not so worried about it for 
my scripts if all I have to do is replace '-w' with 'use warnings'.

I would be nice to get rid of all the chatter in 'make test' from the PDL 
build.

Two observations:

1)  'perl_get_sv' I can only find in very old perl documentation.  In more 
recent perlguts, it seems to have been replaced by 'get_sv'.  Your test 
script works currently with both 'perl_get_sv' and 'get_sv'.  It gives the 
same warning with both, though--PDL may want to consider changing 
perl_get_sv to get_sv.

2) PDL::SHARE seems pretty important--see perldoc PDL::API.

Thanks!

--Doug

[EMAIL PROTECTED]
Software Engineer III
UCAR - COSMIC, Tel. (303) 497-2611

On Mon, 7 Apr 2008, Sisyphus wrote:

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

Reply via email to