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

I recently installed 5.8 and started using it. Previously, I'd been on 5.6, and in deference to new features and behaviors I might be using, put in

So I didn't run into unexplained problems on the occasionally disparate versions I run locally.

Now, in 5.8.0, with warnings on (yes, I only have warnings on when I'm developing, but even so), I get the following when I start my script:

Confused by the new warning, I went and did my RTMing, and found the obscure and noninformative line in perldelta:

I am curious as to the problem which this warning addresses. Can someone enlighten me?


--
"...His madness... His madness keeps him sane..."
      - Delirium, _Sandman_, Neil Gaiman

Replies are listed 'Best First'.
Re: v-string warning in 5.8.0
by vladb (Vicar) on Jul 26, 2002 at 21:09 UTC
    The problem you are having may be related to 'hash keys' not being quoted. At the least this is what I take from this google thread here.

    ;=) Hope this helps!

    _____________________
    # Under Construction
      Hrm.

      That thread gives me pause. I didn't realize (ah, ignorance is bliss) that v-strings are as fraught with danger as they seem to be.

      So then. Let me pose an additional question. What are people's favorite ways of setting version limits on perl 5.x scripts which may be older than 5.6?

Re: v-string warning in 5.8.0
by virtualsue (Vicar) on Jul 26, 2002 at 21:24 UTC
    Just out of curiosity, does the warning go away if you do a require v5.6.0; instead?
      Nope, just checked, making it 5.6.0 doesn't change the warning. Good thought, tho.
Re: v-string warning in 5.8.0
by particle (Vicar) on Jul 27, 2002 at 00:26 UTC
    require 5.006; or require 5.006001 should work as expected.

    ~Particle *accelerates*

Re: v-string warning in 5.8.0
by Anonymous Monk on Jul 27, 2002 at 00:54 UTC
      This is what happens if I do a require 5.6; (or a use 5.6;):
      Perl v5.600.0 required--this is only v5.6.1, stopped (did you mean v5. +6.0?) at it line 4. BEGIN failed--compilation aborted at it line 4.

        Okay! The answer to my question, as I see it from the responses, is as follows:

        1. v-string requires (i.e. require v5.6) are not a usable feature (they are backward combatible). Don't.
        2. Instead, either
          • require 5.006

            or

          • require 5.6.0

        Thank you all for your help!

        update: Everything you wanted to know about Module Version Numbers and Checking contains some more relevant info about v-strings and versioning.

Re: v-string warning in 5.8.0
by z0d (Hermit) on Jul 27, 2002 at 09:57 UTC
    As the docs say, You have to do it:
    use 5.006_001;
    It even works with Perl 5.6.1. A bit strage ( weird? ). I don't know why they had to broke compatibily this way.
    -- <-- z0d -->