Re: Finding all version numbers in a distro's *.pm files

David Golden <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.module-build
Message-ID <[email protected]>
On Mon, Aug 31, 2009 at 9:04 PM, Ron Savage<[email protected]> wrote:
> Hi Folks
>
> I've been reading up on version numbers and the docs for version.pm,
> and looking on CPAN for this one.
>
> Is there a program/module which will scan all *.pm files in a dir, and
> extract what version.pm thinks are version numbers?

That's a rather convoluted issue.  Can you be more specific what
you're trying to do?  Here are some qualifying questions (not mutually
exclusive):

* What version.pm "thinks" -- meaning internal representation?

* What version.pm will output as a string?  What it will output in
'normalized' form?  In numeric form?  (All of these can differ)

* What version.pm will make of the EU::MM->parse_version result?  E.g.
"say version->new( ExtUtils::MM->parse_version($file) )->normal"
(Also, depending on the version of EU::MM, it will load version.pm if
available)

* What Foo->VERSION will give if version.pm is loaded?  (Not
necessarily the same as the parse_version result)

* Which version of perl?  5.6.X?  5.8.0? 5.8.[1-9]? 5.10.X?  All
potentially different answers

Given all that, I know of nothing on CPAN that can easily (and
correctly) answer your question.  Aren't you glad you asked?  :-)

-- David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.