Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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'

Comment on v-strings deprecated; what to use instead?
Select or Download Code
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.

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).

    Hugo

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-10-21 02:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls