Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

v-strings deprecated; what to use instead?

by pbeckingham (Parson)
on May 11, 2004 at 01:58 UTC ( #352282=perlquestion: print w/replies, xml ) Need Help??

pbeckingham has asked for the wisdom of the Perl Monks concerning the following question:

Now that I have upgraded to 5.8.4, I see that v-strings are deprecated. I looked around, and found some discussion on the subject (Everything you wanted to know about Module Version Numbers and Checking and Simple Module Tutorial among many others), but the discussions all predate the deprecation of v-strings, as far as I can tell.

So my question is, what should use I instead of v1.2.3? Is it:

  • 1.23
  • 1.002003
  • '1.2.3'

Replies are listed 'Best First'.
Re: v-strings
by hv (Parson) on May 11, 2004 at 09:17 UTC

    The intention is that you should:

    use version;
    See version (the lower-case one, by John Peacock).


Re: v-strings
by Errto (Vicar) on May 11, 2004 at 02:35 UTC
    I'm running 5.8.3, and I notice that perldata certainly suggests that v-strings are deprecated, but the only mention I could find in perldoc -f use suggests that the 1.002003 form is preferred for backward compatibility reasons, but it doesn't seem to say anything about forward compatibility. But I guess that's better if you want to make all your Perls happy.
Re: v-strings
by castorbaway (Acolyte) on May 11, 2004 at 06:53 UTC

    1.002_03, IIRC.

    On the other hand, v1.2.3 will still work, but it will create a "version object", not a v-string, which will stringify to (IIRC) 1.2.3, and numify to (IIRC) 1.00203.

    You should test everything I'm saying, as I likely do not Recall Correctly.

      Oh yes, it works, but I'm getting the Use of v-strings is deprecated messages. It's those I want to avoid.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://352282]
Approved by graff
Front-paged by asarih
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2021-01-20 13:50 GMT
Find Nodes?
    Voting Booth?