James Muir wrote:
Hi Everybody,

I'm trying to build a module for submission to CPAN. When I use Build.PL, the module builds without any problems (as far as I can tell :-)), BUT... when I use Makefile.PL I get the following message:

(/home/james/Gtk2-Ex-MindMapView-0.0.1)> perl Makefile.PL
Version string 'undef' contains invalid data; ignoring: 'undef' at /usr/lib/perl5/5.8.8/ExtUtils/MM_Any.pm line 1307.
Writing Makefile for Gtk2::Ex::MindMapView

my simple Makefile.PL is as follows:

(/home/james/Gtk2-Ex-MindMapView-0.0.1)> cat Makefile.PL
# Note: this file was auto-generated by Module::Build::Compat version 0.03
use ExtUtils::MakeMaker;
WriteMakefile
(
         'PL_FILES' => {},
         'INSTALLDIRS' => 'site',
         'NAME' => 'Gtk2::Ex::MindMapView',
         'EXE_FILES' => [],
         'VERSION_FROM' => 'lib/Gtk2/Ex/MindMapView.pm',
         'PREREQ_PM' => {
                          'Test::More' => 0,
                          'Gnome2::Canvas' => 0,
                          'version' => 0,
                          'Graph' => 0
                        }
       )
;


and the version info in MindMapView.pm is as follows:

(/home/james/Gtk2-Ex-MindMapView-0.0.1/lib/Gtk2/Ex)> cat MindMapView.pm | head

package Gtk2::Ex::MindMapView;

use version; $VERSION = qv('0.0.1');

use warnings;
use strict;
use Carp;

use Gnome2::Canvas;


as far as I know about the module building process (which is very little at this point), everything looks OK. What am I missing?

I can't reproduce here. Does 'lib/Gtk2/Ex/MindMapView.pm' contain the string $VERSION anywhere else in the file? I doubt that's the problem here though because this looks like an error from version/vxs.

I used Module::Starter to make a little 'Foo' distro.

Foo.pm
package Foo;
use version; $VERSION = qv('0.0.1');
1;

Makefile.PL
use ExtUtils::MakeMaker;
WriteMakefile(
    'PL_FILES' => {},
    'NAME' => 'Foo',
    'VERSION_FROM' => 'lib/Foo.pm',
)

with:

perl 5.8.7
ExtUtils::MakeMaker 6.30
version 0.57

But, it works fine for me. Can you provide a minimal test case that exercises the problem?

Randy.

Reply via email to