develooper Front page | perl.perl5.porters | Postings from July 2009

v-string syntax (was Re: [perl.git] branch blead, updated. GitLive-blead-1645-g95266a8)

Thread Next
Nicholas Clark
July 23, 2009 01:54
v-string syntax (was Re: [perl.git] branch blead, updated. GitLive-blead-1645-g95266a8)
Message ID:
Reply-To: p5p
In-Reply-To: <>
X-Organisation:	Tetrachloromethane

On Wed, Jul 22, 2009 at 11:20:57PM +0200, David Golden wrote:
> In perl.git, the branch blead has been updated
> <>
> - Log -----------------------------------------------------------------
> commit 95266a888819065bd20ca221321a246ac2a8bb30
> Author: David Golden <>
> Date:   Wed Jul 22 17:20:56 2009 -0400
>     v-strings are not deprecated
>     With version objects, we need them for use MODULE VERSION syntax.  This
>     patch removes the deprecation note.

>  =head3 Version Strings
>  X<version string> X<vstring> X<v-string>
> -B<Note:> Version Strings (v-strings) have been deprecated.  They will
> -be removed in some future release after Perl 5.8.1.  The marginal
> -benefits of v-strings were greatly outweighed by the potential for
> -Surprise and Confusion.
> -
>  A literal of the form C<v1.20.300.4000> is parsed as a string composed
>  of characters with the specified ordinals.  This form, known as
>  v-strings, provides an alternative, more readable way to construct

and the rest of that paragraph is key:

   strings, rather than use the somewhat less readable interpolation form
   C<"\x{1}\x{14}\x{12c}\x{fa0}">.  This is useful for representing
   Unicode strings, and for comparing version "numbers" using the string
   comparison operators, C<cmp>, C<gt>, C<lt> etc.  If there are two or
   more dots in the literal, the leading C<v> may be omitted.

I think that we *should* still be deprecating the form without the leading v.
That's the ambiguous form, the silent change.

What's a good wording to make that clear?

Does anyone want to figure out a patch for blead that makes the omitted-v
form issue a deprecation warning?

Nicholas Clark

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About