[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: question about r8708 (Perl warning pragmas)

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-03-04 19:56:05 CET

Ben Reser wrote:

> Using the better method on the newer perls and the old method on the
> older ones. Before someone asks. I tried to use $] and $^V to handle
> the version test. It wasn't very cooperative.

$^V isn't going to work for you, but $] will work fine like this:

BEGIN {
   if ( $] >= 5.006_000)
     { require warnings; import warnings; print qq(warnings\n); }
   else
     { $^W = 1; print qq(^W\n);}
}
$x = 1;

which works for all versions of Perl that I have to test with.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 4 19:54:32 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.