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

'once' warnings from xs modules in perl 5.10.0

Thread Next
From:
Chia-liang Kao
Date:
June 6, 2008 07:37
Subject:
'once' warnings from xs modules in perl 5.10.0
Message ID:
114FFB55-2724-4C3C-9A55-904F982C5868@bestpractical.com
Hi,

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/DynaLoader.pm  2008-06-06  
20:11:29.000000000 +0800
+++ perl510/ext/DynaLoader/DynaLoader.pm       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';

      &$xs(@args);
  }


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About