develooper Front page | perl.perl5.porters | Postings from March 2006

Re: Multiple Perl version support quandary

Thread Previous | Thread Next
Nick Ing-Simmons
March 27, 2006 09:12
Re: Multiple Perl version support quandary
Message ID:
John Peacock <> writes:
>I've been a bad boy and not been testing recent releases of 
>on earlier Perl's.  I've fixed the compatibility problems with one
>exception: I'm using 'no warnings' to suppress the "redefined" noise 
>when I replace UNIVERSAL::VERSION with a version-object aware sub.  This 
>is fine for 5.6.x, but I'm not sure the best way to get around it for 5.005.
>I've got a "compatibility" module for which I could include
>with the 5.005 pure Perl module, but all it does is some 
>horrific fiddling with the global $SIG{__WARN__}.  I don't feel all that 
>bad using it during testing, but I don't want to install it.  I could 
>strip out the 'no warnings' line and just leave the couple of warnings 
>during the test, but it would also show up anytime you used too.
>So the question is: should I install a "compatibility" on 
>5.005 to mostly DTRT?  I can't figure out how to fake
>	no warnings qw(redefine);
>using an inline package (i.e. I can get it loaded but I cannot convince 
>'use' that it _is_ already loaded).

use looks for %INC entry to see if it is already loaded

so :
 package Foo;
 $INC{''} = __FILE__;


use Foo;


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