Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Why is that ?

The version documentation has a section on v-strings that begins:

Beginning with Perl 5.6.0, an alternate method to code arbitrary strings of bytes was introduced, called v-strings. They were intended to be an easy way to enter, for example, Unicode strings (which contain two bytes per character). Some programs have used them to encode printer control characters (e.g. CRLF). They were also intended to be used for $VERSION, but their use as such has been problematic from the start.

And goes on to more discouraging things, including:

the use of bare v-strings to initialize version objects is strongly discouraged in all circumstances (especially the leading 'v' style), since the meaning will change depending on which Perl you are running.

Then gives some guidance in case you insist on using bare v-strings with Perl > 5.6.0.

Re-reading this now, maybe it is only bare v-strings that are being discouraged. On the other hand, maybe they are all problematic but only the bare ones are being strongly discouraged.

Otherwise, Why will v-strings be deprecated and v-strings deprecated; what to use instead? suggest v-strings are deprecated. Have they since been redeemed?

v-strings must die! also suggests v-strings are not good. But this is from 2003, so the situation and intent could have changed since then.

Maybe I shouldn't have been so quick to scratch v-strings off my list of possibilities?


In reply to Re^2: module version numbers by ig
in thread module version numbers by ig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-19 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found