On Sat, Dec 20, 2003 at 08:19:27PM -0800, Stas Bekman wrote:
> Consider a module Foo:
> 
> #Foo.pm
> package Foo;
> $VERSION = '2.0';
> 
> use XSLoader;
> XSLoader::load __PACKAGE__, $VERSION;
> 1;
> 
> % perl-blead-ithread -MExtUtils::MakeMaker \
>   -le 'print MM->parse_version(shift)' Foo.pm
> 2.0
> 
> Now if I put this module as a PREREQ_PM, MM fails to satisfy it, since it 
> fails to parse the version number unless I nuke this line:
> 
> XSLoader::load __PACKAGE__, $VERSION;

As you illustrated above, MM->parse_version is working.  MM is parsing
the version number.  Something else is going wrong.  Also, the PREREQ_PM
logic does not use parse_version().  Its used for VERSION_FROM.

When you say MM fails to satisfy it I presume you mean MM fails to recognize 
that you have this module installed when you run the Makefile.PL.  The logic 
for this is in ExtUtils::MakeMaker->new about lines 385-405.  Fire up
your Makefile.PL in the debugger and step through it.  Its possible the
module had an error when MM tried to load it.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
I can't give you any knowledge, but who wants candy??
        -- http://www.angryflower.com/drawin.gif

Reply via email to