develooper Front page | perl.perl5.porters | Postings from January 2004

Re: [perl #25268] h2xs does not create VERSION stubs

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
January 29, 2004 00:28
Subject:
Re: [perl #25268] h2xs does not create VERSION stubs
Message ID:
20040129072801.GA17459@localhost.comcast.net
On Tue, Jan 27, 2004 at 10:46:50AM +0100, Tassilo von Parseval wrote:
> Interestingly, perlmod.pod is deliberately misleading the reader. It
> gives this code as an example:
> 
>     $VERSION = do { my @r = (q$Revision: 2.21 $ =~ /\d+/g); 
>                     sprintf "%d."."%02d" x $#r, @r };
> 
> This implies that versioning always happens through $VERSION whereas the
> above could also be a candidate for an overridden VERSION() method.

perl -wle 'package Foo;  $VERSION = 4.2;  print Foo->VERSION'
4.2

VERSION() reads $VERSION.


-- 
Michael G Schwern        schwern@pobox.com  http://www.pobox.com/~schwern/
Follow me to certain death!
        http://www.unamerican.com/

Thread Previous | Thread Next


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