This is the current Makefile.PL:
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Lingua::Slavic::Numbers',
VERSION_FROM => 'lib/Lingua/Slavic/Numbers.pm',
PREREQ_PM => { 'List::Util' => 1, 'Regexp::Common' => 1 },
ABSTRACT_FROM => 'lib/Lingua/Slavic/Numbers.pm',
AUTHOR => 'Ted Zlatanov <t...@lifelogs.com>',
);
The failing test just uses that module.
Thanks
Ted
Steve
"Ted Zlatanov" <t...@lifelogs.com> wrote in message
news:868wwkt...@lifelogs.com...
SV> Add Lingua::BG::Numbers to the PREREQ_PM along with a version if necessary.
SV> The value associated with the hash key is a package version number, not a
SV> true/false. If you don't care what version, use 0 and it will just verify
SV> the presence.
Thanks for the advice.
Strangely, I tried
PREREQ_PM => { 'List::Util' => 1, 'Regexp::Common' => 1, 'Lingua::BG::Numbers' => 0 },
and `make test' still says
Warning: prerequisite Lingua::BG::Numbers 0 not found.
Lingua::BG::Numbers has version 0.02.
Also, is it enough to have Lingua::BG::Numbers in the distribution, or
do I also need to register it so CPAN will pick it up for search
results, CPAN shell i// searches, etc? I don't want to just upload it
and hope it works :)
Thanks
Ted
Steve
"Ted Zlatanov" <t...@lifelogs.com> wrote in message
news:86vdzoq...@lifelogs.com...
SV> You need to make sure it's in your search path (i.e. PERL5LIB, installed,
SV> etc.). The version is pulled out of the 'our $VERSION = 0.02' line in the
SV> module. If this doesn't exist then it's not CPAN compliant.
But Lingua::BG::Numbers is a part of Lingua::Slavic::Numbers. It can't
be installed already.
% ls lib/**/*.pm
lib/Lingua/BG/Numbers.pm lib/Lingua/Slavic/Numbers.pm
% grep pm MANIFEST
lib/Lingua/Slavic/Numbers.pm
lib/Lingua/BG/Numbers.pm
% cat Makefile.PL
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Lingua::Slavic::Numbers',
VERSION_FROM => 'lib/Lingua/Slavic/Numbers.pm',
PREREQ_PM => { 'List::Util' => 1, 'Regexp::Common' => 1, 'Lingua::BG::Numbers' => 0 },
ABSTRACT_FROM => 'lib/Lingua/Slavic/Numbers.pm',
AUTHOR => 'Ted Zlatanov <t...@lifelogs.com>',
);
Lingua::BG::Numbers is a wrapper for Lingua::Slavic::Numbers, but due to
the convention for Lingua::LL::Numbers modules (LL is a 2-letter
language code) I can't name it Lingua::Slavic::BG::Numbers.
Does this make sense? Do I want to make a bundle instead?
Ted
TZ> Lingua::BG::Numbers is a wrapper for Lingua::Slavic::Numbers, but due to
TZ> the convention for Lingua::LL::Numbers modules (LL is a 2-letter
TZ> language code) I can't name it Lingua::Slavic::BG::Numbers.
The answer was to use Module::Build, which supports this kind of
inclusion for tests.
Thanks
Ted
> % cat Makefile.PL
> use ExtUtils::MakeMaker;
> WriteMakefile(
> NAME => 'Lingua::Slavic::Numbers',
> VERSION_FROM => 'lib/Lingua/Slavic/Numbers.pm',
> PREREQ_PM => { 'List::Util' => 1, 'Regexp::Common' => 1,
> 'Lingua::BG::Numbers' => 0 }, ABSTRACT_FROM =>
> 'lib/Lingua/Slavic/Numbers.pm', AUTHOR => 'Ted Zlatanov
> <t...@lifelogs.com>', );
First, since Lingua::BG::Numbers is part of your distribution, you are not
PRErequiring them. So remove that (as you had earlier).
Second, check the perldoc for ExtUtils::MakeMaker. Check PMLIBDIRS and PM.
Finally, Module::Build is, in my experience, far easier to deal with. So
don't use the above to be an argument to leave M::B, but merely
informational in case you prefer going back to EU::MM.