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

Multiple Perl version support quandary

Thread Next
From:
John Peacock
Date:
March 27, 2006 07:26
Subject:
Multiple Perl version support quandary
Message ID:
44280449.5040203@rowman.com
I've been a bad boy and not been testing recent releases of version.pm 
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 warnings.pm which I could include
with the 5.005 pure Perl version.pm 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 version.pm too.

So the question is: should I install a "compatibility" warnings.pm 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).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747


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