develooper Front page | perl.perl5.porters | Postings from June 2008

'once' warnings from xs modules in perl 5.10.0

Thread Next
Chia-liang Kao
June 6, 2008 07:37
'once' warnings from xs modules in perl 5.10.0
Message ID:

I noticed that in perl 5.10 i get an 'once' warning if i load an xs  
module who does a get_sv in boot.
Specifically this is the Subversion perl bindings generated by swig.

I wonder if it makes sense for that warning to come out from an xs  
module which supposedly knows what it is doing ?  in that case the  
following patch would silent the warnings from dynaloader. might need  
the similar fix to xsloader if this is the sane way to do it.

--- perl510.orig/ext/DynaLoader/  2008-06-06  
20:11:29.000000000 +0800
+++ perl510/ext/DynaLoader/       2008-06-06  
22:06:44.000000000 +0800
@@ -226,6 +226,7 @@
      # See comment block above

         push(@dl_shared_objects, $file); # record files loaded
+       no warnings 'once';


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About