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

Re: *-couragement of $^V

Thread Previous | Thread Next
December 9, 2014 15:37
Re: *-couragement of $^V
Message ID:

Le 09/12/2014 13:26, David Golden a écrit :
> On Mon, Dec 8, 2014 at 3:30 PM, Ricardo Signes
>     I suggest that given the general confusion around v-strings and version
>     objects, as well as the fact that $^V has changed its behavior in
>     the past, it
>     is not actually better than $].  Since $] always works, and always
>     works the
>     same way, we should encourage its use rather than $^V's.  We can
>     accomplish
>     that by discouraging the use of $^V, in favor of $], in the docs.
>     Yes?
> No.
> The same logic would say we should discourage the // operator.
> $^V wasn't really useful until it became a version object.  When
> toolchain finally drops v5.8 support, and we're all dragged kicking and
> screaming into using a Perl major version less than 10 years old[1],
> then $^V is fine to use.  I don't see any point in discouraging it even
> before it ever becomes useful.

$^V being a version object is actually quite a good reason *not* to use 
it. version objects should have been restricted to Perl module versions, 
instead of forcefully trying to conflate perl versions in them as well.

Anyway, if you want to check for perl's version, why would you ever want 
to use the least available syntax between $] and $^V ? This kinda 
defeats the whole point of the check (in the same way as "use 5.10.1" vs 
"use 5.010_001", but don't get me started on that).


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