Click here to get back home

how to install multiple modules with one Makefile.PL

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to install multiple modules with one Makefile.PL Ted Zlatanov 07-02-2008
Posted by Ted Zlatanov on July 2, 2008, 11:56 am
Please log in for more thread options
I'm packaging Lingua::BG::Numbers with Lingua::Slavic::Numbers for CPAN,
using ExtUtils::MakeMaker. What's the proper way to structure
Makefile.PL to indicate this? MANIFEST is already correct, but "make
test" doesn't automatically put Lingua::BG::Numbers in the lib path.

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',
);

The failing test just uses that module.

Thanks
Ted

Posted by Stephen Vance on July 2, 2008, 1:33 pm
Please log in for more thread options
Add Lingua::BG::Numbers to the PREREQ_PM along with a version if necessary.
The value associated with the hash key is a package version number, not a
true/false. If you don't care what version, use 0 and it will just verify
the presence.

Steve

> I'm packaging Lingua::BG::Numbers with Lingua::Slavic::Numbers for CPAN,
> using ExtUtils::MakeMaker. What's the proper way to structure
> Makefile.PL to indicate this? MANIFEST is already correct, but "make
> test" doesn't automatically put Lingua::BG::Numbers in the lib path.
>
> 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',
> );
>
> The failing test just uses that module.
>
> Thanks
> Ted



Posted by Ted Zlatanov on July 2, 2008, 3:33 pm
Please log in for more thread options
wrote:

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

Posted by Stephen Vance on July 2, 2008, 5:29 pm
Please log in for more thread options
You need to make sure it's in your search path (i.e. PERL5LIB, installed,
etc.). The version is pulled out of the 'our $VERSION = 0.02' line in the
module. If this doesn't exist then it's not CPAN compliant.

Steve

> On Wed, 2 Jul 2008 13:33:42 -0400 "Stephen Vance"
>
> 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



Posted by Ted Zlatanov on July 3, 2008, 9:22 am
Please log in for more thread options
wrote:

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',
);


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

Similar ThreadsPosted
multiple packages (modules) in the same file May 2, 2005, 3:53 pm
Creating Makefiles for multiple nested modules June 8, 2006, 3:33 pm
install modules error May 16, 2008, 10:54 pm
Howto run pre-install perl modules December 27, 2004, 2:57 am
Local install of modules - no root; no telnet November 9, 2004, 12:54 am
Modules installed with PPM -- how to install on air-gapped machines December 30, 2004, 7:16 pm
Unable to install 'Msql-Mysql-modules' July 27, 2005, 3:50 am
perl upgrade, req to understand which modules to install October 2, 2006, 2:54 pm
Simplest Makefile.PL July 27, 2007, 4:08 pm
GD.pm Makefile not installing GD::Polyline July 12, 2005, 5:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap