develooper Front page | perl.perl5.porters | Postings from December 2014

Re: *-couragement of $^V

Thread Previous | Thread Next
John Peacock
December 9, 2014 03:30
Re: *-couragement of $^V
Message ID:
On 12/08/2014 10:01 PM, Leon Timmermans wrote:
> I never said the current behavior is bad, but most of my code dealing
> with this sort of thing has to work on 5.8, which means I can't rely on
> current behavior.

Saying "If you may need to support arbitrary Perl releases prior to 
5.8.0, use $]" should be sufficient.  I'm completely unclear what 
confusion the proposed change is supposed to resolve.

FWIW, this works from 5.7.3 onwards (courtesy of the "magic v-string" 

> $ perl -le 'print ($^V > 5.7.3)'
> 1
> $ perl -v
> This is perl, v5.8.1 built for x86_64-linux

That form doesn't even require version objects.  What am I missing?


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