[sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries

David Christensen dpchrist at holgerdanske.com
Mon May 13 13:11:37 PDT 2019


On 5/13/19 1:33 AM, Shlomi Fish wrote:
> Hi David,

Hi Shlomi.  Thank you for taking the time to look at my distribution.


> On Sat, 11 May 2019 23:28:28 -0700
> David Christensen <dpchrist at holgerdanske.com> wrote:
> 
>> hello, world!
>>
>> I have created a new Perl 5 library (distribution):
>>
>>       http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/
>>
>>
>> Please review and comment.
> 
> 1. It is good that the .html file does not require JS to be read.

Agreed.


> 2. This seems quite useful.

I hope so -- I've been going around in circles for years trying to find 
a light weight solution for building inter-dependent functions, modules, 
and/or distributions.  The idea for this distribution grew out of a 
solution Joe Brenner showed me (he has a massive PERL5LIB set by a 
script that crawls his development tree).


> 3. Does it accept "perl Makefile.PL" arguments?

Yes -- arguments received by 'perl Makefile.PL' are passed through to 
the recursive 'perl Makefile.PL' invocations.  At this point, the only 
argument I am aware of is 'verbose' (per 'perldoc ExtUtils::MakeMaker):

2019-05-13 12:51:41 dpchrist at tinkywinky 
~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB
$ 
PERL5LIB=/home/dpchrist/perl5/lib/perl5:/home/dpchrist/src/perl5/Dist-MultiMaker/lib 
&& perl Makefile.PL verbose
Reading file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.opt'
Reading file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB'
Reading file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST'
Processing line '../../../A/Makefile.PL'
Writing file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/A/.MultiMaker.opt'
   ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/A.pm]
   AUTHOR => [q[David Paul Christensen <dpchrist at holgerdanske.com>]]
   BUILD_REQUIRES => {  }
   CONFIGURE_REQUIRES => {  }
   INSTALL_BASE => q[/home/dpchrist/perl5]
   LICENSE => q[perl]
   NAME => q[Dist::MultiMaker::Example::A]
   PREREQ_PM => {  }
   TEST_REQUIRES => {  }
   VERSION_FROM => q[lib/Dist/MultiMaker/Example/A.pm]
Using PERL=/usr/bin/perl
Generating a Unix-style Makefile
Writing Makefile for Dist::MultiMaker::Example::A
Writing MYMETA.yml and MYMETA.json
Skip blib/lib/Dist/MultiMaker/Example/A.pm (unchanged)
Manifying 1 pod document
Reading file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST'
Processing line '../../../B/Makefile.PL'
Writing file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/B/.MultiMaker.opt'
   ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/B.pm]
   AUTHOR => [q[David Paul Christensen <dpchrist at holgerdanske.com>]]
   BUILD_REQUIRES => {  }
   CONFIGURE_REQUIRES => {  }
   INSTALL_BASE => q[/home/dpchrist/perl5]
   LICENSE => q[perl]
   NAME => q[Dist::MultiMaker::Example::B]
   PREREQ_PM => { Dist::MultiMaker::Example::A=>q[0] }
   TEST_REQUIRES => {  }
   VERSION_FROM => q[lib/Dist/MultiMaker/Example/B.pm]
Using PERL=/usr/bin/perl
Generating a Unix-style Makefile
Writing Makefile for Dist::MultiMaker::Example::B
Writing MYMETA.yml and MYMETA.json
Skip blib/lib/Dist/MultiMaker/Example/B.pm (unchanged)
Manifying 1 pod document
Writing file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB'
Writing file 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/Makefile'


Similarly, arguments to 'make' are passed through:

2019-05-13 12:51:49 dpchrist at tinkywinky 
~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB
$ make
PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \
for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A 
/home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \
     make -C $d all ; \
done
make[1]: Entering directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/A'
Manifying 1 pod document
make[1]: Leaving directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/A'
make[1]: Entering directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/B'
Manifying 1 pod document
make[1]: Leaving directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/B'

2019-05-13 13:08:59 dpchrist at tinkywinky 
~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB
$ make test TEST_VERBOSE=1
PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \
for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A 
/home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \
     make -C $d test ; \
done
make[1]: Entering directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/A'
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" 
"-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef 
*Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t
t/Dist-MultiMaker-Example-A.t ..
1..2
ok 1 - use Dist::MultiMaker::Example::A;
example_a called from main t/Dist-MultiMaker-Example-A.t 5
ok 2
ok
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.03 cusr 
0.00 csys =  0.07 CPU)
Result: PASS
make[1]: Leaving directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/A'
make[1]: Entering directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/B'
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" 
"-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef 
*Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t
t/Dist-MultiMaker-Example-B.t ..
1..2
ok 1 - use Dist::MultiMaker::Example::B;
example_b called from main t/Dist-MultiMaker-Example-B.t 5
example_a called from Dist::MultiMaker::Example::B 
/home/dpchrist/src/perl5/Dist-MultiMaker/example/B/blib/lib/Dist/MultiMaker/Example/B.pm 
19
ok 2
ok
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.02 cusr 
0.00 csys =  0.06 CPU)
Result: PASS
make[1]: Leaving directory 
'/home/dpchrist/src/perl5/Dist-MultiMaker/example/B'


> 4. It reminds me of the symlinks' DSL I defined for
> https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/setup-all/setup-all.pl

DSL?


Could you please describe the concept of the script and/or show an 
example of its use?


David


More information about the SanFrancisco-pm mailing list