On Sat, Jul 25, 2009 at 06:58:42AM -0700, John Peacock wrote:

> For bleadperl, I believe Nicolas would like this to be the case:

Yes, by 5.12, yes, this behaviour, for the reasons that David has described.

> $any1 = v34.23.45; # silent
> $any2 = 45.32.57; # warn(v-string without leading 'v' deprecated)

but I didn't see any urgency to have the code change in blead this week.

> I'm traveling today, so I can do whatever needs doing when I get home 
> tonight.  I'd prefer to apply this change:
> 
> diff --git a/util.c b/util.c
> index 0d524e9..f088e73 100644
> --- a/util.c
> +++ b/util.c
> @@ -4260,8 +4260,12 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, 
> bool qv)
>      if ( alpha && saw_period && width == 0 )
>         Perl_croak(aTHX_ "Invalid version format (misplaced _ in number)");
> 
> -    if ( saw_period > 1 )
> +    if ( saw_period > 1 && qv == 0) {
>         qv = 1; /* force quoted version processing */
> +       if(ckWARN(WARN_SYNTAX))
> +           Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
> +           "v-string without leading 'v' deprecated for version objects");
> +    }
> 
>      last = pos;
>      pos = s;

I has assumed that the relevant code was in toke.c, as part of the tokeniser.
Clearly, I was wrong.

Logically, the code can be kept identical everywhere, with an
#if PERL_VERSION > 10

> plus the test fixups to blead and then have that go into maint.  If you 

No, I didn't assume that any of this would change the core behaviour in maint.
Quite the contrary.

And given that doing it in blead requires that things be fixed up in blead,
(which I hadn't realised) it feels like the wrong time to do it, given the
repository structure, and the ramifications of making such changes right now.

Nicholas Clark

Reply via email to