develooper Front page | perl.perl5.porters | Postings from September 2011

Re: [rt.cpan.org #70622] Versions Disappear

From:
David Golden
Date:
September 8, 2011 14:25
Subject:
Re: [rt.cpan.org #70622] Versions Disappear
Message ID:
CAOeq1c-Ev_GZx=dtX=vJAMFCRn-rzaQRt7dEm+Vod4RBC7CFkg@mail.gmail.com
On Thu, Sep 8, 2011 at 4:11 PM, David E. Wheeler <david@kineticode.com> wrote:
> I'm outputting the version in the "generated by" meta header of HTML. I do something similar for the PGXN API, where a header identifies the version.

If it were my code, I'd use $Foo::VERSION.  I don't care about global
access, because it's my own global.

> So I just want a string. And the original is a vstring.

And now you're stuck with it. You can do this if you know it's a
v-string and don't want to mess with version.pm:

    sprintf("v%vd", $Foo::VERSION) # "v1.2.3"

-- David



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About