Re: [PATCH 1/3] configure: Add test for Perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Dennis" == Dennis Stosberg <dennis@xxxxxxxxxxxx> writes:

Dennis> +	_perl_version=`"$_perl" -e 'require 5.6.0;printf "%vd", $^V'`

perl -V:version gives you the version like:

        version='5.8.6';

nice and eval-able. :)  But you can just rely on the exit status from

        perl -e 'eval { require 5.006; 1 } or exit 1'

which will be good (0) if the perl is new enough, and bad (1) if the perl is
too old.  (Perl4 will really barf and give an error as well, but still
be an exit 1.)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]