まずは雛形作成スクリプトが作ってくれたMakefile.PLを動かす。これでmakefileが出来る。
$ perl Makefile.PL include /home/**********************************************************/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm include inc/Module/Install/Makefile.pm Cannot determine perl version info from lib/******************************.pm include inc/Module/Install/AuthorTests.pm include inc/Module/Install/TestBase.pm include inc/Module/Install/Include.pm include inc/Test/Base.pm include inc/Test/Base/Filter.pm include inc/Spiffy.pm include inc/Test/More.pm include inc/Test/Builder.pm include inc/Test/Builder/Module.pm include inc/Module/Install/WriteAll.pm include inc/Module/Install/Win32.pm include inc/Module/Install/Can.pm include inc/Module/Install/Fetch.pm Writing Makefile for ********************************** Writing META.yml
できたmakefileでmakeする。
$ make Skip blib/lib/******************************/***.pm (unchanged) Skip blib/lib/******************************/***.pm (unchanged) Skip blib/lib/******************************/****.pm (unchanged) Skip blib/lib/******************************/****.pm (unchanged) Skip blib/lib/******************************/********.pm (unchanged) Skip blib/lib/******************************.pm (unchanged) Skip blib/lib/******************************/***.pm (unchanged) Skip blib/lib/******************************/********.pm (unchanged) Skip blib/lib/******************************/******.pm (unchanged) Skip blib/lib/******************************/**********.pm (unchanged) Manifying blib/man3/**********************************.3pm Manifying blib/man3/******************************************.3pm
テストする。
$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t xt/*.t t/00_compile.t ...... ok xt/01_podspell.t .... skipped: Test::Spelling is not installed. xt/02_perlcritic.t .. skipped: Test::Perl::Critic is not installed. xt/03_pod.t ......... ok All tests successful. Files=4, Tests=11, 1 wallclock secs ( 0.11 usr 0.03 sys + 0.53 cusr 0.08 csys = 0.75 CPU) Result: PASS
配布用のパッケージを作る。
$ make dist rm -rf *********************************** /usr/bin/perl "-Iinc" "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'***********************************', 'best');" mkdir *********************************** mkdir ***********************************/inc mkdir ***********************************/inc/Test mkdir ***********************************/inc/Test/Base mkdir ***********************************/inc/Module mkdir ***********************************/inc/Module/Install mkdir ***********************************/xt mkdir ***********************************/lib mkdir ***********************************/lib/********** mkdir ***********************************/lib/***************** mkdir ***********************************/lib/*****************/***** mkdir ***********************************/lib/*****************/*****/** mkdir ***********************************/inc/Test/Builder mkdir ***********************************/t /usr/bin/perl "-Iinc" -I. "-MModule::Install::Admin" -e "dist_preop(q(***********************************))" tar cvf ***********************************.tar *********************************** ***********************************/ ***********************************/inc/ ***********************************/inc/Test/ ***********************************/inc/Test/Builder.pm ***********************************/inc/Test/Base/ ***********************************/inc/Test/Base/Filter.pm ***********************************/inc/Test/Builder/ ***********************************/inc/Test/Builder/Module.pm ***********************************/inc/Test/More.pm ***********************************/inc/Test/Base.pm ***********************************/inc/Module/ ***********************************/inc/Module/Install.pm ***********************************/inc/Module/Install/ ***********************************/inc/Module/Install/Fetch.pm ***********************************/inc/Module/Install/TestBase.pm ***********************************/inc/Module/Install/Include.pm ***********************************/inc/Module/Install/Makefile.pm ***********************************/inc/Module/Install/Base.pm ***********************************/inc/Module/Install/Metadata.pm ***********************************/inc/Module/Install/AuthorTests.pm ***********************************/inc/Module/Install/Can.pm ***********************************/inc/Module/Install/WriteAll.pm ***********************************/inc/Module/Install/Win32.pm ***********************************/inc/Spiffy.pm ***********************************/Changes ***********************************/xt/ ***********************************/xt/02_perlcritic.t ***********************************/xt/01_podspell.t ***********************************/xt/perlcriticrc ***********************************/xt/03_pod.t ***********************************/MANIFEST ***********************************/lib/ ***********************************/lib/**********/ ***********************************/lib/**********/******/ ***********************************/lib/**********/******/*****/ ***********************************/lib/**********/******/*****/**/ ***********************************/lib/**********/******/*****/**/***.pm ***********************************/META.yml ***********************************/t/ ***********************************/t/00_compile.t ***********************************/.gitignore ***********************************/README ***********************************/Makefile.PL rm -rf *********************************** gzip --best ***********************************.tar g/zip: ***********************************.tar.gz already exists; do you wish to overwrite (y or n)? y
作成されたパッケージをPAUSE経由でアップロード。