éå±ã§æ ãè ã§ãããå€ãã®å Žåãšã©ãŒãåŒãèµ·ãããšããäºå®ã«å ããŠïŒããŒãžã§ã³çªå·ãªã©ã®ã¡ã¿æ å ±ãããã€ãã®ãã¡ã€ã«ã§æŽæ°ããå¿ èŠãããããŸãã¯ãªãªãŒã¹æã«ã³ãã³ãã®äžéšãæå³ããã«ã¹ãããããããïŒãPerlov TIMTOWTDIã«ãã£ãŠãã¹ãŠãããã«è€éã«ãªããŸã-ããã€ãã®ç°ãªããã«ãã·ã¹ãã ããããŸãã誰ããèªåã®é·æãšçæãæã£ãŠããŸãïŒãã ãããããããªã¹ãããåçŽãªã¿ãã¬ããã¯ãããŸããïŒãå ¬åŒã«ãã³ãã¥ããã£ãããæšå¥šãããŸããã
ããã«ãç§ãã¡ã®å€ãã¯é·å¹Žçç ã§æžããŠããã perlnewmodãæåŸã«èªãã ã®ã¯çç ãå匷ãããšãã§ããã ãã®çµæãæ°ããã¢ãžã¥ãŒã«ãäœæããããšãããã¯15幎åã®ã¹ã¿ã€ã«ã§è¡ãããããšãå€ããã¢ã»ã³ããªã·ã¹ãã ã¯ã»ãŒã©ã³ãã ã«éžæãããŸã -å€ããŠäœ¿ãæ £ããæ£ç¢ºãªEUMMãŸãã¯ä»ã®1ã€ïŒå¿ èŠã§ã¯ãªãããïŒ ãããããæ°ããåé¡ãäœæããããšãªããEUMMãããç°¡åã§äŸ¿å©ã§ããããšãæåŸ ããŠ... ...
以äžã¯ãçç ã¢ãžã¥ãŒã«ã®éçºããã»ã¹ãä¿é²ããã¢ãžã¥ãŒã«ãããã¢ãã³ã«ããä»ã®éçºè ãã¢ãžã¥ãŒã«ãç°¡åã«æ¹è¯ã§ããããã«ããã2015幎ã®åãã«å©çšå¯èœãªããŒã«ãç°¡åã«èª¬æããŠããŸãã ç§ã¯åœŒãã®äž»ãªé·æãšçæããªã¹ãããããšããŸãããã èªåã§ã¯äœ¿çšããŸããã§ãããã³ã¡ã³ãã«å¿ããŠãã®ãªã¹ããè£è¶³/ä¿®æ£ããŸãã
- ã¿ã¹ã¯
- $ããŒãžã§ã³
- ã¢ãžã¥ãŒã«ã¹ã±ã«ãã³/ãã€ã©ãŒãã¬ãŒã
- æ§ç¯ãã
- äŸåé¢ä¿ç®¡ç
- ããŒãžã§ã³ç®¡ç/ VCS
- ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³/ CI
- ãªãªãŒã¹
- ãµããŒã
- ãªãŒãµãªã³ã°
- ãŸãšã
- ã¢ãžã¥ãŒã«äœæè åãã®ããŸããŸãªãŠãŒãã£ãªãã£
ã¿ã¹ã¯
ããã§ã¯ãPerlã¢ãžã¥ãŒã«ã®ãªãŒãµãªã³ã°ããã»ã¹ã«éåžžå«ãŸããã¿ã¹ã¯ã®ãªã¹ããäœæããŸãããã
æ°ããã¢ãžã¥ãŒã«ãäœæãããšãã®ã¿ã¹ã¯ïŒ
- èè å/ã¡ãŒã«ã¢ãã¬ã¹ãèšå®
- ã©ã€ã»ã³ã¹ãå®çŸ©ãã
- çµç«ã·ã¹ãã ãéžæ
- è¿œå æ©èœãéžæããŸãã
- XSãµããŒã
- åºæ¬çãªãã¹ãã¹ã€ãŒãïŒããã¥ã¡ã³ãã®ãã§ãã¯ãã¹ãã«ãã³ãŒãå質ãäŸåé¢ä¿ãã·ã¹ãã ãã¡ã€ã«ã®ãã«ããªã©ïŒ
- ã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãããã®READMEã®èªåçæ
- vcsã䜿çšãã
- GitHubãTravis CIãšã®çµ±å
- ã¢ãžã¥ãŒã«ã®ã¹ã±ã«ãã³ãäœæããŸã-éçºãšãªãªãŒã¹ã«å¿
èŠãªäžé£ã®ãã¡ã€ã«ãå«ããã£ã¬ã¯ããªïŒ
- ã¢ãžã¥ãŒã«èªäœã®ã¹ã±ã«ãã³ãšããã¥ã¡ã³ã
- åºæ¬çãªãã¹ãã¹ã€ãŒã
- å€æŽç¹
- Readme
- å èš±
- ã·ã¹ãã ãã¡ã€ã«ãæ§ç¯ãã
- äŸåé¢ä¿ã®ãªã¹ãïŒãã«ãã·ã¹ãã ãã¡ã€ã«ã«å«ãŸããããšããããŸãïŒ
- VCSã䜿çšããå ŽåïŒãªããžããªãšãã®èšå®
æ°ããããŒãžã§ã³ã®ãªãªãŒã¹ã®ã¿ã¹ã¯ïŒ
- äŸåé¢ä¿ãªã¹ããæŽæ°ãã
- ã¢ãžã¥ãŒã«ãçµã¿ç«ãŠã
- ãã¹ããå®è¡ãã
- æ°ããããŒãžã§ã³çªå·ãéžæããããã€ãã®ãã¡ã€ã«ã§å€æŽããŸãïŒããã€ãã®ãã¡ã€ã«ã§-ããã€ãã®å Žæã§ïŒ
- å€æŽã®å€æŽã説æãã
- çŸåšã®æ¥ä»ãšãªãªãŒã¹ããŒãžã§ã³ãå€æŽã«è¿œå ãã
- READMEãæŽæ°
- VCSã䜿çšããå ŽåïŒ
- ããŒãžã§ã³ã®å€æŽãå€æŽãããã³ãã®ä»ãã¹ãŠã®å€æŽããããã¡ã€ã«ãã³ããããã
- æ°ããããŒãžã§ã³ã®ã¿ã°ãè¿œå
- ã»ã³ãã©ã«ãªããžããªïŒGitHubïŒã䜿çšããå Žå-å€æŽãéä¿¡ãã
- ã¢ãžã¥ãŒã«ã§ã¢ãŒã«ã€ããäœæ
- CPANã«ã¢ããããŒããã
çæ³çã«ã¯ãæ°ããã¢ãžã¥ãŒã«ãäœæãããšãã«å¿ èŠãªãã¹ãŠã®æ±ºå®ïŒXSã§ã®å¿ èŠæ§ãé€ãïŒã1åè¡ããå°æ¥çã«ã¯1ã€ã®ã³ãã³ãã§æ°ããã¢ãžã¥ãŒã«ãäœæããå¿ èŠããããŸãã ãŸãããªãªãŒã¹ã§ã¯ãçæ³çã«ã¯ã1ã€ã®ããŒã ãæ°ããããŒãžã§ã³çªå·ãéžæããå€æŽã®å€æŽã説æãã以å€ã®ãã¹ãŠã®æé ã«åŸãå¿ èŠããããŸãã
æŽæ°ïŒãããèªãã§ãããªãŒãµãªã³ã°ããšã¯äœããMakefile.PL / Build.PLã®éåžžã®äœ¿çšãšã®éããç解ããŠããªãå Žå-ããã2ã€ã® ã³ã¡ã³ããèªãã§ãã ããã
$ããŒãžã§ã³
å®ç§ãªäžçã§ã¯ãPerlã®ããŒãžã§ã³çªå·ã«ã€ããŠããã°ãæžãããšã¯ãããŸããã質åã®æåŸã«é²ãåã«ã1ã€ã®åé¡ã説æããå¿ èŠããããŸããããã¯ãã¢ãžã¥ãŒã«ããŒãžã§ã³ã®åœ¢åŒãéžæããããšã§ãã ããã¯èšäºã®ãããã¯ã«çŽæ¥é¢ä¿ããŠããŸãããããã®éžæã¯ãªãŒãµãªã³ã°ããã»ã¹äžã«è¡ãå¿ èŠããããèŠãç®ã»ã©ç°¡åã§ã¯ãããŸããã
ãããŒãžã§ã³çªå·ã¯éå±ãªã¯ãã§ãã-David Golden
ã¢ãžã¥ãŒã«ã®ããŒãžã§ã³ã誀ã£ãŠå®£èšããæ¹æ³ã¯ããããããã®ã§ ãæ£ãããã®ã ãããªã¹ãããŸã-ãã£ãšå°ãªãã§ãã
å€ã10é²æ°/å€ãã¹ã¿ã€ã«ã®10é²æ°
å®å®ãªãªãŒã¹ïŒã奜ã¿ã§2æ¡/ 3æ¡ïŒïŒ
our $VERSION = '0.08'; our $VERSION = '0.008'; package MyModule 0.08; # need perl-5.12 package MyModule 0.008; # need perl-5.12
0.09
/
0.009
ãªãªãŒã¹åã®CPANãã¹ã¿ãŒããã¹ãããããã®ã¢ã«ãã¡çïŒ
our $VERSION = '0.08_01'; our $VERSION = '0.008_001';
ãŸãã¯ããšã«ãããŠãŒã¶ãŒã«ã¢ã«ãã¡çã衚瀺ãããªãå Žåãå®å®ãªãªãŒã¹ãšäžå®å®ãªãªãŒã¹ã®2ã€ã®ç¬ç«ããã·ãŒã±ã³ã¹ã䜿çšã§ããŸãã
ãããä»ã10é²æ°
å®å®ãªãªãŒã¹ïŒããŒãžã§ã³ã§ã¯3ã€ä»¥äžã®æ°åã䜿çšã§ããŸãïŒïŒ
use version; our $VERSION = 'v0.8.0'; # need perl-5.8.1 our $VERSION = 'v0.8.0'; # need perl-5.10 package MyModule v0.8.0; # need perl-5.12
v0.8.1
ã®ãªãªãŒã¹åã«CPANãã¹ã¿ãŒããã¹ãããããã®ã¢ã«ãã¡çïŒ
use version; our $VERSION = 'v0.8.0_1'; # need perl-5.8.1 our $VERSION = 'v0.8.0_1'; # need perl-5.10
"v0.8_1"
ã¯å®å®ç
"v0.8.0"
ãš
"v0.8.1"
éã®ã¢ã«ãã¡çãšããŠã䜿çšã§ããŸãããããŒãžã§ã³ã¯1ã€ãããããŸãããè€æ°ã®ã¢ã«ãã¡çããªãªãŒã¹ããå¿ èŠãããå Žåã¯ãçªå·
"v0.8.1"
å®å®çããªãªãŒã¹ããŠ
"v0.8.1"
倱æããŸãã
ã»ãã³ãã£ãã¯
çŸæç¹ã§ã¯ãã»ãã³ãã£ãã¯ããŒãžã§ãã³ã°ã®ä»æ§ã«å®å šã«æºæ ããæ¹æ³ã¯ãããŸããã
"1.2.3-alpha1"
ãšããŠå®çŸ©ãããŠãããã¬ãªãªãŒã¹ããŒãžã§ã³ã¯ãããŒã«ã¢ãžã¥ãŒã«ã«é©çšã§ããŸããã æãè¿ããªãã·ã§ã³ã¯äžèšã®3èŠçŽ ã®ããããšæ°åã®ããŒãžã§ã³ã§ã-ä»æ§ã«åŸã£ãŠæ¬¡ã®å®å®ããŒãžã§ã³ã決å®ããããã®ã«ãŒã«ã«åŸããããã¹ãã®ãã¬ãªãªãŒã¹ããŒãžã§ã³ã®ä»£ããã«æ°å€ã¢ã«ãã¡ããŒãžã§ã³ããªãªãŒã¹ã§ããŸãã
ãã©ã€ã¢ã«
ã¢ã«ãã¡çã¯ãå€åœäººã®ååãèšãããã«ãããå°»ãçããããšã«æ°ã¥ããŸããã å®éãããã¯å®éã®ãã¢ã«ãã¡ãã«é¢ãããã®ã§ã¯ãããŸãããå®éã®ã¢ã«ãã¡ãããŒã¿ãããã³ãã®ä»ã®ãã¬ãªãªãŒã¹ããŒãžã§ã³ã¯ãã»ãã³ãã£ãã¯ããŒãžã§ãã³ã°ã®ä»æ§ã«èšèŒãããŠãããpearlã§ã¯ãµããŒããããŠããŸããã ããã¯ã CPANã«ãã®ããŒãžã§ã³ã®ãã€ã³ããã¯ã¹ãäœæããªããã³ãã³ããäžããããšã§ãã ãããã£ãŠã2ã€ã®ã¿ã€ãã®ããŒã¿ã1ã€ã®å€æ°ïŒCPANã®ããŒãžã§ã³çªå·ãšãã©ã°ïŒã«
"v0.8.1"
ããããšãã¹ã¿ã€ã«ãæªããèŠèŠãããªããæ··ä¹±ããŸãïŒãªãªãŒã¹åã«éžæãããã®
"v0.8.1"
-
"v0.8_1"
ãŸãã¯
"v0.8.0_1"
ïŒïŒãã®ä»ã®åé¡ãçºçããŸããã¢ã«ãã¡ããŒãžã§ã³ã¯ããã±ãŒãžã§æå®ã§ããŸãããäžéšã®å€ãããŒãžã§ã³ïŒ5.8.1ãŸã§ïŒã®perlã§ã¯æ£ããåäœããŸããã
å°ãåã«ãCPANã«æ°ããæ¹æ³ãè¿œå ãããã³ãã³ãã«ãã®ããŒãžã§ã³ããã€ã³ããã¯ã¹ãäœæããªãã-ã¢ãžã¥ãŒã«ã®ã¢ãŒã«ã€ãåã«
"TRIAL"
ãšããååãå«ãŸããŠããå Žåã ãããã£ãŠããã¢ã«ãã¡ãããŒãžã§ã³ã¯äœ¿çšã§ããªããªããŸãã äžéšã®ãŠãŒãã£ãªãã£ïŒ Dist :: Zilla ã shipitãªã©ïŒã¯ãCPANã«
"-TRIAL"
ããåã«
"-TRIAL"
ã¢ãžã¥ãŒã«ã䜿çšããŠã¢ãŒã«ã€ãåã«è¿œå ãããã©ã¡ãŒã¿ãŒããµããŒãããŠããŸãã
"v1.2.3-TRIAL"
ïŒ
"v1.2_3"
ãšã¯ç°ãªããŸãïŒã¯
"v1.2_3"
ã®éåžžããŒãžã§ã³ã§ããããã次ã®ããŒãžã§ã³ã¯
"v1.2.4"
ãŸãã¯
"v1.2.4-TRIAL"
ãŸãã
ã¢ãžã¥ãŒã«ã¹ã±ã«ãã³/ãã€ã©ãŒãã¬ãŒã
ãããã®ãŠãŒãã£ãªãã£ã¯ãæ°ããã¢ãžã¥ãŒã«ã䜿çšããŠãã£ã¬ã¯ããªãäœæãããã³ãã¬ãŒãã®çš®é¡ã«å¿ããŠå¿ èŠãªãã¡ã€ã«ã®åºæ¬ã»ããããã®ã¢ãžã¥ãŒã«ã«æ ŒçŽããŸãã ããã¯æãå€ããã®ã§ããããŸã§ã®ãšãããæ°ããã¢ãžã¥ãŒã«ãäœæããäž»ãªæ¹æ³ã§ãã ãã®ã¢ãããŒãã®åé¡ã¯ããããã®ãã¡ã€ã«ã®å€§éšåã¯äžåºŠäœæããã ãã§ã¯äžååã§ãããã¢ãžã¥ãŒã«ã®æ°ããããŒãžã§ã³ããªãªãŒã¹ããããšãã«çµ¶ããæŽæ°ããå¿ èŠãããããšã§ãã ãã®ãããå€ãã¯ãããã®ãŠãŒãã£ãªãã£ïŒéåžžã¯Dist :: Zillaã«åºã¥ããŠããŸãïŒã®ä»£ããã«ãããè€éãªãœãªã¥ãŒã·ã§ã³ãåŸã ã«äœ¿çšãå§ããŠããŸãã
h2xsãã¢ãžã¥ãŒã«::ã¹ã¿ãŒã¿ãŒ
ãããã®ã¢ãžã¥ãŒã«ã®äœ¿çšæ³ã¯perlnewmodã§èª¬æãããŠããŸããããã€ã³ãã¯éåžžã«æ代é ãã§ãããå®éã«ã¯ãµããŒããããŠããã ãè€éãããŠååãªæè»æ§ããªãããšã§ãã
CPANã«ã¯ã åæ§ã® ã¢ãžã¥ãŒã«ãå€æ°ãããŸãããç§ãèŠããã®ã¯ãã¹ãŠäœè ã®ããŒãºã«åããããã®ã§ãããæè»æ§ã«æ¬ ããŠããŸãããå®éããã³ãã¬ãŒãã«åŸã£ãŠæ°ããã¢ãžã¥ãŒã«ã䜿çšããŠã«ã¿ãã°ãçæããã¿ã¹ã¯ã¯éåžžã«åçŽã§ãã»ãšãã©ã®äººãç¬èªã®ãã€ã¯ãäœæããŸãïŒç§ã®ãã®ã¯
~/bin/
ã«ãã20è¡ã®ã¹ã¯ãªããã§ããããå®å šã«ã«ã¹ã¿ãã€ãºå¯èœã§ãïŒã
æ§ç¯ãã
ã¢ãžã¥ãŒã«ã®95ïŒ ã«è€æ°ã®pmãã¡ã€ã«ããã¹ããããã³æšæºã®å°ããªXSãå«ãŸããŠãããããã©ã®ãã«ãã·ã¹ãã ã§ãåŠçã§ããŸãã
5.10.1以éãconfigure_requiresã®ãµããŒããç»å ŽããŸãã-ã€ãŸã ããã§
META.{json,yml}
perl Makefile.PL
ãŸãã¯
perl Build.PL
å®è¡ããåã«ã€ã³ã¹ããŒã«ããã¢ãžã¥ãŒã«ã
META.{json,yml}
ã§æå®ã§ããŸãã èšãæãããšããŠãŒã¶ãŒããããšãã°Module :: Build :: Tinyãã€ã³ã¹ããŒã«ããŠãããã©ããã¯åé¡ã§ã¯ãããŸãããããã䜿çšããŠã¢ãžã¥ãŒã«ããã«ãã§ããŸãã ãŸãã¯ãã¢ãžã¥ãŒã«çšã®ãã«ãã·ã¹ãã ãäœæã§ããŸãã
ExtUtils :: MakeMakerïŒå¥åEUMMïŒ
æ©èœïŒ
-
make
ãå¿ èŠ - äŸåé¢ä¿ã°ã©ãã®ãµããŒãããããŸãïŒ
make
ã®äœ¿çšã®ãããïŒ
çæïŒ
- ã¢ã»ã³ããªããã»ã¹ãå€æŽããã«ã¯ãéåžžã
Makefile
ãå€æŽããå¿ èŠãããMakefile
ïŒMakefile
ããŒã¹ãè¿œå ããããäœããã®æ¹æ³ã§å€æããŸããããã«ãMakefile
圢åŒãšããã«äœ¿çšãããã·ã§ã«ã³ãã³ãã®äž¡æ¹ã®ç¹ã§ç§»æ€å¯èœãªæ¹æ³ã§è¡ãå¿ èŠããããŸãïŒ-ããã¯éåžžã«åŒ·åã§ãè€éãª- å€æŽãè¡ããšãã¯ã移æ€å¯èœãªã³ãŒããæžãå¿ èŠããããŸã
- 倧ããããŠè€éã§ã 誰ãããããµããŒããããéçºãããããããªã
- ãã©ã°ã€ã³ãæžãã®ãé£ãããåæã«è€æ°ã®ãã©ã°ã€ã³ãæ¥ç¶ããã®ãé£ãã
å©ç¹ïŒ
- ãã¹ãŠã®éžæè¢ã®äžã§æãæè»æ§ãé«ããããé£ããå Žåã¯EUMMã®ã¿ã䜿çšããå¿ èŠããããŸã
ã¢ãžã¥ãŒã«::ãã«ãïŒå¥åMBïŒ
æ©èœïŒ
- åäœããã®ã«ååãªperlã§ã
make
ãã移æ€å¯èœãªMakefile
æžãæ¹ã«é¢ããç¥èãå¿ èŠãããŸããã - ãã£ãã³ãã³ã·ãŒã°ã©ãã®ãµããŒããªãïŒã¢ã»ã³ããªäžã«äœã«äŸåãããïŒ
- ã³ã¢ïŒperlã§é åžãããã¢ãžã¥ãŒã«ïŒããåé€ãããŸãã-ããã¯äœã«ã圱é¿ããŸãããïŒconfigure_requiresã®ãããïŒã FUDã®æ³¢ãåŒãèµ·ãããŸããã å®éããããåé¿ããæ°ããçç±ã¯ãããŸããã§ãããå€ãçç±ãããªããæ¢ããããšãã§ããªãã£ããªãããããå·éã«ãããŠããã«äœ¿ãç¶ããŠãã ããã
çæïŒ
- 倧ããããŠè€éã§ã誰ãããããµããŒããããéçºãããããããªã
- EUMMã«äŒŒãã¢ãŒããã¯ãã£ã®ããïŒæ¡åŒµæ©èœã«ã€ããŠã¯ãæ¢ã«å®è¡ãããä»ã®ã³ãŒããçæããããã«äœ¿çšãããã³ãŒããèšè¿°ããå¿ èŠããããŸãïŒãåãåé¡ããããŸã-ãã©ã°ã€ã³ãèšè¿°ããããšã¯é£ãããè€æ°ã®ãã©ã°ã€ã³ãåæã«æ¥ç¶ããããšã¯å°é£ã§ãïŒæè¿ç»å Žããã¢ãžã¥ãŒã«::ãã«ãïŒ ïŒPluggable㯠ããã®åé¡ã®åŸåã解決ããããšããŠããŸãïŒ
å©ç¹ïŒ
- 䜿çšããå°éã§ãEUMMããã¯ããã«ç°¡åã«æ¡åŒµ
ã¢ãžã¥ãŒã«::ã€ã³ã¹ããŒã«ïŒå¥åMIïŒ
æ©èœïŒ
- EUMMã®ã©ãããŒ
çæïŒ
- ãã®æç¹ã§configure_requiresãååšããªããšããåé¡ã解決ããããã«ãèªåèªèº«ãš
inc/
çŸåšã®ã¢ãžã¥ãŒã«ãæ§ç¯ããããã«å¿ èŠãªãã¹ãŠã®ãã©ã°ã€ã³ãã³ããŒããŠãæ°ããåé¡ãäœæããŸããïŒãããŠä»ã§ã¯ãã®æå³ãå®å šã«å€±ããŸããïŒ-ãã°ãä¿®æ£ããããã«ã¢ãžã¥ãŒã«ãåçºè¡ããå¿ èŠããMIã«é¢é£ããã³ãŒãã¯ãªããžããªã§åžžã«æŽæ°ããããããVCSã䜿çšããäžäŸ¿ãã䌎ãMIããŒãžã§ã³
å©ç¹ïŒ
- ã·ã³ãã«ã§çŽæçãªã€ã³ã¿ãŒãã§ãŒã¹
EUMMãšã¢ãžã¥ãŒã«::ãã«ãã«å¯Ÿããã³ãã¥ããã£ã®æºå ŽäžèŽã®å«æªæã«ãããããããç§ã¯ã¢ãžã¥ãŒã«::ã€ã³ã¹ããŒã«ãæè¿çå£ã«åãæ¢ããããªããªã£ããšããå°è±¡ãåããŸãã-圌ãæã äœæããåé¡ã¯åœŒã®ã¡ãªãããäžåã£ãŠããŸããã
ã¢ãžã¥ãŒã«::ãã«ã:: TinyïŒå¥åMBTïŒ
æ©èœïŒ
- ããã120è¡ã®ã³ãŒãã§ã»ãšãã©ã®ã¢ãžã¥ãŒã«ã«ååãªããŒã«ã¢ã»ã³ããªã·ã¹ãã ãäœæã§ããããšã瀺ããå®éš
Build.PL
ã¯æ¬¡ã®ããã«ãªããŸãã
use 5.008001; # only if you need it use Module::Build::Tiny; Build_PL();
å¥åŠãªããšã«ãããã䜿çšããããšãã§ããŸã-äŸåé¢ä¿ç®¡çã«cpanfileãã¡ã€ã«ã䜿çšãããªãŒãµãªã³ã°ã«mbtinyãŠãŒãã£ãªãã£ã䜿çšïŒ
Build.PL
ã
MANIFEST
ã
META.{json,yml}
çæã
META.{json,yml}
ãã¢ãžã¥ãŒã«ã§ã¢ãŒã«ã€ããæºåããŸã-ã¢ãžã¥ãŒã«ãããããšïŒãã«ãããã³ã¢ãžã¥ãŒã«ã¢ã»ã³ããªããã»ã¹ã«é©çšãããªããã®ïŒã ãŸãã¯ã
mbtiny
代ããã«Dist :: Zillaã䜿çšããŸãïŒã¡ãªã¿ã«ã Dist :: MillaãšMinillaã¯MBTã䜿çšããŸãããã«ãã·ã¹ãã ãæ©èœãããäžèŠãªãã¿ã¹ã¯ãåŒãåããªãå Žåããã®ãããªæŽç·Žãããã·ã¹ãã ã«éåžžã«äŸ¿å©ã§ãïŒã
äŸåé¢ä¿ç®¡ç
cpanfile
ããã¯ãäŸåé¢ä¿ããã«ãã·ã¹ãã ãšã¯
cpanfile
ãã¡ã€ã«ã§æå®ããã¢ãããŒãã§ãã ããã«ã¯ããã€ãã®çç±ããããŸãã
- ç°ãªãã¢ãžã¥ãŒã«ã§ç°ãªããã«ãã·ã¹ãã ã䜿çšããå Žåãcpanfileã䜿çšãããšãç°ãªããã«ãã·ã¹ãã ã®æ§æã®éãïŒããã³å¶é-EUMMãšã¢ãžã¥ãŒã«::ã€ã³ã¹ããŒã«ã¯ãŸã å®å šã«CPAN :: Meta :: Spec 2.0ããµããŒãããŠããŸããïŒãå¿ãããã¹ãŠã«åã圢åŒã䜿çšã§ããŸã ïŒã¡ãªã¿ã«ã圢åŒã¢ãžã¥ãŒã«::ã€ã³ã¹ããŒã«ãšäºææ§ããããŸãïŒã
- åæ§ã«ãçç ã¢ãžã¥ãŒã«ã ãã§ãªãã éåžžã®ã¢ããªã±ãŒã·ã§ã³ ïŒéåžž
Makefile.PL
ãŸãã¯Build.PL
ããªããäŸåé¢ä¿ãæå®ããå ŽæãBuild.PL
ãªãïŒã«ãäŸåé¢ä¿ãèšå®ã§ããŸã-å®éããã®æ©èœã®ããã«ãcpanfileãéçºãããŸããã ããã«ãå¥ã®äŸåé¢ä¿ã«å¥ã®ãœãŒã¹ãèšå®ã§ããŸãããã®ãœãŒã¹ã¯ããã©ã€ããŒãCPANãã©ãŒãgitãªã©ããååŸã§ããŸãã -
cpanm --installdeps .
ãcpanm --installdeps .
ããã¹ãŠã®äŸåé¢ä¿ãã€ã³ã¹ããŒã«ã§ãcpanm --installdeps .
ãŸãã¯META.{json,yml}
ãªãã«ãŒãã³META.{json,yml}
ãã¡ã€ã«ã - Module :: Installã䜿çšãããšã
inc/
ããã³META.{json,yml}
ããªããžããªã«ä¿æã§ãããModule :: Installã®äŸåé¢ä¿ã "configure"ïŒconfigure_requiresïŒã§ã¯ãªã "develop"ïŒauthor_requiresïŒãšããŠæ£ããæå®ã§ããŸããã ãã ããModule :: Installãã€ã³ã¹ããŒã«ãããŠããªãä»ã®éçºè ã¯ãcpanm --with-develop --installdeps .
ãcpanm --with-develop --installdeps .
ããŠã€ã³ã¹ããŒã«ã§ããŸãcpanm --with-develop --installdeps .
ãŸãã¯carton
ã
ããŒãžã§ã³ç®¡ç/ VCS
çç ã¢ãžã¥ãŒã«ã®å Žåãäžæ¹ã§ã¯ãã¢ãžã¥ãŒã«ãæ§ç¯ããããã«å¿ èŠãªãã¹ãŠã®ãã¡ã€ã«ããªããžããªã«ä¿åããå¿ èŠãããããšã«çæããå¿ èŠããããŸãïŒ
cpanm
ãä»ããŠãªããžããªããçŽæ¥ã€ã³ã¹ããŒã«ã§ããä»ã®éçºè ããã©ãŒã¯åŸã«ãããžã§ã¯ãã®äœæ¥ããŒãžã§ã³ãååŸã§ããããã«ããããïŒäžæ¹ãäžå¿ èŠãªèªåçæãã¡ã€ã«ïŒããšãã°ãã¢ãžã¥ãŒã«::ã€ã³ã¹ããŒã«ãã¡ã€ã«ã
inc/
ïŒã§æ£ããããªãããã«ããã«ã¯ãåžžã«ããããã³ãããããå¿ èŠããããããã«diffãªã©ãæ£ããããŸãã ããã¯ç¹ã«Dist :: Zillaã®ãŠãŒã¶ãŒã«åœãŠã¯ãŸããŸã-ãã«ãªã¯ãšã¹ããåãåãããå Žåã¯ãäºçŽ°ãªããšãä¿®æ£ããã人ã«ãããžã§ã¯ãã®ãã«ããéå§ããããã«150-200ã®è¿œå ã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããããã«åŒ·å¶ããå¿ èŠã¯ãããŸããã
Github
GitHubã䜿çšããå Žåãã»ãšãã©ã®å Žåãè¿œå ã®ã¢ãžã¥ãŒã«èšè¿°ã
README.md
ã«èšè¿°ããããã¢ãžã¥ãŒã«ã®PODããã¥ã¡ã³ããããã®ãã¡ã€ã«ã®èªåçæãæ§æããå¿ èŠããããŸãã 2çªç®ã®ã±ãŒã¹ã§ã¯ãè¿œå ã®èŠçŽ ãè¿œå ããå¿ èŠãããå ŽåããããŸããããšãã°ãTravis CIã®ãããžã§ã¯ãã®ãã«ãã¹ããŒã¿ã¹ã§ãã
ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³/ CI
CPANãã¹ã¿ãŒ
2013幎4æãŸã§ã CPANãã¹ã¿ãŒã¯åå¥ã®test_requiresããµããŒãããŠããŸããã§ãã ïŒäŸåé¢ä¿ã¯ãã¹ãã®å®è¡ã«ã®ã¿å¿ èŠã§ãïŒã åæã«ãçµç«ã·ã¹ãã ã¯é·ãéãããã瀺ãããšãå¯èœã«ããŠããŸãã...ããããããã¯æ©èœããŸããã§ããã ãã®çµæãäžéšã®ã¢ãžã¥ãŒã«éçºè ã¯éåžžã«æã£ãŠãããã¹ããŒããªtest_requiresãªãã§æ°ããããŒãžã§ã³ããªãªãŒã¹ãããã®æ©èœãå¿ããŠããŸããã ã ããã ãã§ã«å¯èœã§ãïŒ test_requiresã®è©³çŽ°ã¯ããã«ãã·ã¹ãã ã®ç°ãªãããŒãžã§ã³ã«ãããµããŒããå¿ èŠãšããŸãã
ååãšããŠãCPAN TestersãµãŒãã¹ã¯åºæ¬çãªããŒãºãã«ããŒããŸããã1ã€ã®æ¬ ç¹ããããŸãããã¹ãã¯ãªãªãŒã¹åŸã«è¡ãããŸãã ãªãªãŒã¹åã«CPAN Testerãä»ããŠã¢ãžã¥ãŒã«ãå®è¡ããã«ã¯ãç¹å¥ãªã¢ã«ãã¡ããŒãžã§ã³ããªãªãŒã¹ããå¿ èŠããããŸã -ããã§ããããã¯ãªãªãŒã¹ã§ãããCPAN Testersã¯ããã»ã©éãåäœããŸããã
GitHub + Travis CI
GitHub Travis CIã®ã¢ãžã¥ãŒã«ã䜿çšããŠãªããžããªã«æ¥ç¶ããããšã«ãããperlã®ããã€ãã®ããŒãžã§ã³ã§ ãªãªãŒã¹ããåã«ã¢ãžã¥ãŒã«ã®çŸåšã®ããŒãžã§ã³ã®ãã¹ããèªååã§ããŸãïŒãã ããç°ãªããã©ãããã©ãŒã ã®ç¹ã§ã¯CPANãã¹ã¿ãŒã»ã©ã¯ãŒã«ã§ã¯ãããŸãããããã·ã³ã§ã®ã¿ãã¹ããå®è¡ãããããåªããŠããŸãïŒ ïŒ
ãªãªãŒã¹
ã¢ããª:: scan_prereqs_cpanfile
ã¢ãžã¥ãŒã«ã®äŸåé¢ä¿ãåæãã
cpanfile
ãçæããããçŸåšã®
cpanfile
ãšã®å·®ç°ã衚瀺ããããã®scan-prereqs-cpanfileã³ãã³ããæäŸããŸãïŒæåã§å€æŽããåã«åçæããããšã¯ãå§ãã§ããŸããïŒã
Perl ::ããŒãžã§ã³
ïŒã»ãŒïŒãã¹ãŠã®ã¢ãžã¥ãŒã«ãã¡ã€ã«ã®ããŒãžã§ã³çªå·ãå€æŽããperl-reversionã³ãã³ããæäŸããŸãã
README
ããµããŒãããŠã
README
ã
README.md
ãµããŒãããŠããŸã
README.md
ã
CPAN ::ã¢ããããŒããŒ
ã³ãã³ãã©ã€ã³ããCPANã«ã¢ãžã¥ãŒã«ãã¢ããããŒãããããã®cpan-uploadã³ãã³ããæäŸããŸãã PAUSEã®ãã°ã€ã³/ãã¹ã¯ãŒãã
~/.pause
ã¯ãGnuPGã§æå·åã§ããŸãã
Github
æ®å¿µãªãããGitHubã¯ãæ°ããããŒãžã§ã³ã®ã¿ã°ãè¿œå ãããšãã«ïŒããšãã°ããã©ã°ã€ã³ã§CPANãGitHubããã¢ãžã¥ãŒã«ããã³ãã§ããªããšèšãæ¹ãããããæ£ãããããããŸãããïŒãããŒã«ã¢ãžã¥ãŒã«ãCPANã«èªåçã«ã¢ããããŒãã§ããŸããjQueryïŒã ããããç§ã¯ãŸã ãã®ã¢ã€ãã ãããã«æ®ããŸããçªç¶ãé©åãªäººããããèŠãŠãæ©èœãè¿œå ããŸãã
ãµããŒã
CPAN RT
CPANãã°ãã©ãã«ãŒã¯ãé·å¹Žå©çšå¯èœãªå¯äžã®ãªãã·ã§ã³ã§ãã ãã®äžäŸ¿ãªã€ã³ã¿ãŒãã§ãŒã¹ãèãããšãããã¯éåžžã«æ²ããã£ãã§ãã äžæ¹ãã¢ãžã¥ãŒã«ã®éçºæã«VCSã䜿çšããªãå Žåã§ã䜿çšã§ããŸãã
幞ããªããšã«ã
META.{json,yml}
æå®ã§ããããã«ãªããŸã
META.{json,yml}
ïŒãã¡ããããã³ãã«ã§ã¯ãªãã䜿çšãããŠãããã«ãã·ã¹ãã ãéããŠïŒ 代æ¿ãã°ãã©ãã«ãŒ ïŒGitHubãªã©ïŒãæå®ããŸãã æ®å¿µãªãããããã«ããCPANããã³MetaCPANãµã€ãã®ãã°ãã©ãã«ãŒãžã®ãªã³ã¯ãå€æŽãããŸãããCPAN RTã§ã¢ãžã¥ãŒã«ã®ãã±ãããè¿œå ããæ©èœã¯ç¡å¹ã«ãªããŸããïŒãã ããåªå ãã°ãã©ãã«ãŒãå¥ã®å Žæã«ãããšããéç¥ã衚瀺ãããŸãïŒã ãã¡ããããã°ãã©ãã«ãŒãå€æŽããåŸã çŸåšã®ãã°ã¯RTã«æ®ããŸãã
Github
GitHubã§ãããžã§ã¯ãããµããŒãããããšã®å©ç¹ãšå©äŸ¿æ§ã«ã€ããŠã¯èª¬æããŸããïŒç¹ã«CPAN RTãšæ¯èŒããŠé¡èã§ãïŒã ããã«ãGitãæ°ã«å ¥ããªããŠããåé¡ãªãMercurialãããŒã«ã«ã§æäœã§ãããããžã§ã¯ããGitHubã«ä¿æã§ããŸãïŒ hg-gitãã©ã°ã€ã³ã䜿çšïŒã
çŸåšã®ãã±ãããCPAN RTããGitHub Issuesã«ç§»åãããå Žåã¯ã rt-to-github.plãŸãã¯å€ãããŒãžã§ã³ã®ãã®å€æŽãè©Šãããšãã§ããŸãã
ãªãŒãµãªã³ã°
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãã¢ãžã¥ãŒã«ã®ãªãŒãµãªã³ã°ããã»ã¹ãå®å šã«åŒãç¶ããŠãŒãã£ãªãã£ã«ã€ããŠèª¬æããŸããå€ãã®å Žåãäžèšã®ãŠãŒãã£ãªãã£ã䜿çšããŠåã ã®ãªãŒãµãªã³ã°ãµãã¿ã¹ã¯ã解決ããŸãã
2ã€ã®ãµãŒããŒãããã1ã€ãã€ã³ã¹ããŒã«ãããã°ããã§ã27åã®CPANã¢ãžã¥ãŒã«ãããããŸããã2çªç®ã®ãµãŒããŒã¯ãé·å¹Žã«ããã£ãŠå€ãã®çç ãããžã§ã¯ããéçºããŠããã248åã®CPANã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ãããŠããŸãã ãã®ã»ã¯ã·ã§ã³ã§èª¬æãããŠãŒãã£ãªãã£ã®ããã«ãåãµãŒããŒã«ã€ã³ã¹ããŒã«ããå¿ èŠãããè¿œå ã®CPANã¢ãžã¥ãŒã«ã®æ°ãèšç®ããŸããã
- Dist :: ZillaïŒè¿œå ã®ãã©ã°ã€ã³ãªãïŒã§ã¯ãæåã®ãµãŒããŒã«162ã¢ãžã¥ãŒã«ã2çªç®ã®ãµãŒããŒã«83ã¢ãžã¥ãŒã«ãå¿ èŠã§ãã
- Dist :: MillaïŒå®éãDist :: Zillaã®ãã©ã°ã€ã³ã®éžæïŒã«ã¯257ããã³166ã¢ãžã¥ãŒã«ãå¿ èŠã§ãã
- MinillaïŒæå°ã®äŸåé¢ä¿ãäž»ãªå©ç¹ã®1ã€ãšããŠå®£èšïŒ-126ããã³41ã¢ãžã¥ãŒã«ã
- ShipIt-1ããã³1ã
- ã¢ããª:: ModuleBuildTiny-8ããã³6ã
è·é¢::ãžã©
ããã¯æ¬åœã®ã¢ã³ã¹ã¿ãŒã§ãã 圌ã¯äœã§ãããŸãïŒ CPANã§ã¯ãDist :: Zillaã®æ©èœãæ¡åŒµãã480ã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã«çŽ900ã®ã¢ãžã¥ãŒã«ãå«ãŸããŠããŸãã ãããã®480åã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ãã¡ã315åã¯ãã©ã°ã€ã³ïŒDist :: Zilla :: Plugin :: *ïŒã§ãããå¥ã®100åã¯ãããã®ãã©ã°ã€ã³ã®ç°ãªãã³ã¬ã¯ã·ã§ã³ïŒDist :: Zilla :: PluginBundle :: *ïŒã§ãã
åé¡ã¯2ã€ãããããŸããã圌ãããªããå人çã«å¿ èŠãšããããšãå§ããã®ã«äœæ¥ãè²»ããå¿ èŠããããããããŠããã䜿çšããããã«ã€ã³ã¹ããŒã«ããå¿ èŠãããã¢ãžã¥ãŒã«ã®æ°ã§ãã
æåã®åé¡ã«ã€ããŠã¯äœãèšããŸããã ç§ã¯ãããŠåå ããèªåã®ããã«ãããã«ã¹ã¿ãã€ãºããããšããŸããã§ããã 誰ããããããã-ã³ã¡ã³ãã§ããªãã®å°è±¡ãå ±æããŠãã ããã
2çªç®ã®åé¡ãååã«éèŠã§ããã¢ãžã¥ãŒã«ãžã®ããããšãã«ãªã¯ãšã¹ããåãåãããå Žåãã¢ãžã¥ãŒã«ãå€æŽããã人ããããéåžžã«ç°¡åã«è¡ããããšãå¿ èŠã§ãã ããã€ãã®è¡ãä¿®æ£ããããã«CPANã®ååãã€ã³ã¹ããŒã«ããå¿ èŠãããå ŽåïŒèè ã«ãããšååã§ã¯ãªã0.6ïŒ ã®ã¿ã§ãããšäž»åŒµããŸãïŒãéæšæºã®ãã«ãããã»ã¹ã«å¯ŸåŠããå ŽåãããããåŸ ã¡ãŸããã
è·é¢::ãã©
æ©èœïŒ
- Dist :: Zillaããã³ã©ãããŒãŠãŒãã£ãªãã£çšã®ãã©ã°ã€ã³ã®éžæ
- Perlã©ã€ã»ã³ã¹ã䜿çšããŠãå€æŽããPODã§å¥ã®ã©ã€ã»ã³ã¹ã«çœ®ãæããŸãã
- äŸåé¢ä¿ã®èªåæ€åºããã³èªåæŽæ°ã¯ãããŸãã
cpanfile
æåã§èšè¿°ããå¿ èŠããããŸã-
scan-prereqs-cpanfile --diff=cpanfile
ã䜿çšããŠãcpanfile
ãŸã è¿œå ãããŠããªããã¹ãŠã®æ°ãããã©ã°ã€ã³ããã°ããèŠã€ããããšãã§ããŸãã
-
- 䜿çšãããã«ãã·ã¹ãã ãéžæã§ããŸãïŒModule :: Build :: TinyïŒããã©ã«ãïŒãModule :: BuildãŸãã¯EUMMãéžæãããã«ãã·ã¹ãã ã®ãã¹ãŠã®æ©èœã䜿çšã§ãããã©ããã¯
Build.PL
ãŸããBuild.PL
åã¢ã»ã³ããªãåçæãããŸã
çæïŒDistãšæ¯èŒããŠ:: ZillaïŒïŒ
- ã€ã³ã¹ããŒã«ããå¿
èŠãããäŸåé¢ä¿ã®æ°ãããã«å€ã...ããããããã¯ãã©ã°ã€ã³ã®ç¬èªã®éžæãã³ã³ãã€ã«ããããã«æ°æ¥ãç¯çŽã§ãããšããäºå®ã«ãã£ãŠå€§å¹
ã«çžæ®ºãããŸãã
- ãã ããREADME.mdã®Travis CIã¬ããŒãã§ã®ãããžã®åºåãªã©ã®æ°ããæ©èœãè¿œå ããå Žåã¯ãè¿œå ã® Dist :: Zilla ãã©ã°ã€ã³ãæ€çŽ¢ããŠæ¥ç¶ããå¿ èŠããããŸã
- XSã¢ãžã¥ãŒã«ã¯ãµããŒããããŠããªãããã§ãïŒãããããè¿œå ã®ãã©ã°ã€ã³ãæ¥ç¶ããå¿ èŠããããŸãïŒ
å©ç¹ïŒ
- å€ãã®äººæ°ã®ããDist :: Zillaãã©ã°ã€ã³ã¯ãã³ãŒããã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ããå€æŽãïŒãŸãã¯ãããè¡ããã©ã°ã€ã³ã«äŸåããŸãïŒãã¯ãŒã¯ãããŒã®å€æŽã匷å¶ããŸã-Dist :: Millaã«ã¯åºæ¬çã«ãã®ãããªãã©ã°ã€ã³ã¯ãããŸããïŒã³ãŒããšããã¥ã¡ã³ããå€æŽããã®ã¯ããªãã ãã§ãïŒãªãªãŒã¹æã®
$VERSION
ã¢ããããŒããé€ãïŒ- æå®ãããã¡ã¿ããŒã¿ã«åºã¥ããŠã³ãŒã/ããã¥ã¡ã³ããå€æŽãã代ããã«ãDist :: Millaã¯éæ¹åã«åäœããã³ãŒããããã¥ã¡ã³ããããã³ãªããžããªã«åºã¥ããŠã¡ã¿ããŒã¿ãèšç®ããŸã-Module :: InstallãModuleã®ãããªã¢ã»ã³ããªã·ã¹ãã ã¯åžžã«å®è¡ããŠããŸãïŒ ïŒãã«ã
- Dist :: Zillaã䜿çšããã»ãšãã©ã®ã¢ãžã¥ãŒã«ãšã¯ç°ãªãããµãŒãããŒãã£ã®éçºè
ã¯Dist :: Millaã䜿çšããŠã¢ãžã¥ãŒã«ã®éçºã«ç°¡åã«åå ã§ããŸã-Dist :: Zillaãã€ã³ã¹ããŒã«ããããéæšæºã®ãã«ãããã»ã¹ãã¢ãžã¥ãŒã«ã®å€èŠ³ããã«ãããã¹ããã€ã³ã¹ããŒã«ãè¡ãå¿
èŠã¯ãããŸãããã¹ãŠã®æ®éã®ã¢ãžã¥ãŒã«ã®ããã«
- ç¹ã«ãã¢ãžã¥ãŒã«ã¯GitHubããçŽæ¥ã€ã³ã¹ããŒã«ã§ããŸãã
- Dist :: Zillaã®ãã©ã°ã€ã³ã®ã»ãããéžæããã³æ§æããã®ã«æ°æ¥ãè²»ããå¿ èŠã¯ãããŸãããããã«ããªãè¯ãã¹ã¿ãŒã¿ãŒãããã䜿çšããŠéå§ããå¿ èŠã«å¿ããŠå€æŽã§ããŸãã
- å¥ã®ãã«ããŸãã¯ãªãŒãµãªã³ã°ã·ã¹ãã ã䜿çšããŠæ¢åã®ã¢ãžã¥ãŒã«ãDist :: Millaã«ç§»è¡ããããã®ãµããŒã
ãããŒã©
æ©èœïŒ
- Dist :: Millaãšã»ãŒåãæ¢å®ã®èšå®ã§åäœããŸã
çæïŒ
- ã»ãšãã©èšå®ã§ããªã
å©ç¹ïŒ
- æšæºã¢ãžã¥ãŒã«ã¢ã»ã³ããª/ã€ã³ã¹ããŒã«ããã»ã¹ã«å¯Ÿå¿
- Distã䜿çšããŸãã:: Zilla
- Dist :: MillaãããäŸåé¢ä¿ãå€§å¹ ã«å°ãªã
- XSããµããŒã
- ç°ãªããã«ããŸãã¯ãªãŒãµãªã³ã°ã·ã¹ãã ã䜿çšããŠæ¢åã®ã¢ãžã¥ãŒã«ãMinillaã«ç§»è¡ããããã®ãµããŒã
æŸé埳å®ïŒMinillaã®èè ïŒãšã»ãŒåãæ¹æ³ã§ãªãŒãµãªã³ã°ãè¡ãå ŽåããŸãã¯ãªãŒãµãªã³ã°ã®æ£ç¢ºæ§ãæ°ã«ããªãå Žåãäž»ãªããšã¯ããã¹ãŠãç®±ããåºããŠããã«æ©èœããããšã§ãïŒã€ãŸããgitãšGitHubã䜿çšïŒå€æ°ã®ã¢ãžã¥ãŒã«ãã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã-Minillaã¯æé©ã§ãã ä»ã«äœããè¡ãå¿ èŠãããå Žåã¯ã代æ¿åãæ¢ãå¿ èŠããããŸãïŒã»ãšãã©ã®å ŽåãDist :: Millaã§ãïŒã
Shipit
1ã€ã®ã³ãã³ãã§
shipit
ãæ°ããããŒãžã§ã³ããªãªãŒã¹ãããšãã«å¿ èŠãªã»ãšãã©ã®æäœãå®è¡ã§ããŸãã
ã¢ãžã¥ãŒã«ãã£ã¬ã¯ããª
.shipit
ã«ãã¡ã€ã«ãäœæãããŸãã次ã®ãããªãã®ã§ãã
steps = FindVersionãChangeVersionãCheckChangeLogãDistTestãCommitãTagãMakeDistãUploadCPAN
ãããŠä»ãèµ·åãããšã次ã®æäœ
shipit
ãå®è¡ãã
.shipit
ãŸãïŒ
- 圌ãã¯ããªãã«æ°ããããŒãžã§ã³çªå·ãå°ããŸã
- æ°ããããŒãžã§ã³ã¯ã¢ãžã¥ãŒã«ã³ãŒãã§èšè¿°ãããŸã
- ã®ãšã³ããªã®å¯çšæ§ã確èªãã
Changes
è¿œå ãææ¡ããŸã - ãã¹ããå®è¡ããŸãïŒãµããŒã
Makefile.PL
ããã³Build.PL
ïŒ - ã³ãããããŸãïŒGit / Mercurial / SVNããµããŒãïŒ
- æ°ããããŒãžã§ã³ã®ã¿ã°ãè¿œå
- ã¢ãžã¥ãŒã«ã§ã¢ãŒã«ã€ããæºåãã
- CPANã«ã¢ãŒã«ã€ããã¢ããããŒã
䜿çšå¯èœãªãã¹ãŠã®æäœã¯ãã©ã°ã€ã³ãšããŠèšèšãããŠãããããCPANã«ã¯è¿œå ã®ã¢ãžã¥ãŒã«ããã£ã±ãã§ãïŒ
README
PODããã®çæãPODã§ã®ããŒãžã§ã³ã®æŽæ°ãåã¢ãžã¥ãŒã«ã®ã³ãŒãã§ã®æ°ããããŒãžã§ã³ã®äœæããœãŒã·ã£ã«ãããã¯ãŒã¯ã§ã®ã¢ããŠã³ã¹ãªã©ïŒã
ShipItããµããŒãããããã©ããã¯æããã§ã¯ãããŸãã-æ°å¹ŽéæŽæ°ãããŠããããçŸåšèè ã¯Dist :: Millaã«ç©æ¥µçã«åãçµãã§ãããShipItããDist :: Millaãžã®ç§»è¡ã«ã€ããŠèª¬æããŠããŸããç§ã®æèŠã§ã¯ãShipItã¯å¿ èŠãªã»ãšãã©ãã¹ãŠãå®è¡ããåæã«éåžžã«å°ãããã·ã³ãã«ã§ãæ¡åŒµå¯èœã§ãäŸåé¢ä¿ããããŸãããèè ã圌ã«äœã奜ãŸãªãã£ããããããŠåœŒãShipItã®ãã©ã°ã€ã³ã«äžè¶³ããŠããæ©èœãè¿œå ãã代ããã«ãDist :: Zillaã®ã©ãããŒãäœæããããšã«ããçç±ã¯ããããŸãããã«ãããšDist :: ZillaïŒDist :: Zillaãéçºããåã«ShipItãç©æ¥µçã«äœ¿çšããŠããïŒShipItã®äž»ãªåé¡ã¯ããã©ã°ã€ã³ã§æ¡åŒµããéã®è€éããšæè»æ§ã®æ¬ åŠã§ãã確ãã«ãDist :: Zillaã¯ãã®åé¡ã培åºçã«è§£æ±ºããŸããã
ã¢ããª:: ModuleBuildTiny
ç§ã¯ãããèšäºã«å«ãã䟡å€ããããã©ããé·ãéèããŠããŸããããã®æ©èœã¯åæ©çã§ãããçŸåšã®ããŒãžã§ã³ã¯0.005ã§ã1幎é誰ãæŽæ°ããŠããŸãã...ããããå æ¥ãèè ãç©æ¥µçã«åãçµãã§ããã ãã§ãªããDist :: ZillaãŸãã¯Minillaã§ã¯ãªããModule :: Build :: TinyãçŽæ¥äœ¿çšããå¿ èŠããããŸãã
å°ãªããšããã®æ©èœãäžèšã®ãŠãŒãã£ãªãã£ãšæ¯èŒããå Žåãããã¯ãªãŒãµãªã³ã°ãŠãŒãã£ãªãã£ãšã¯ç°ãªããŸããããããèè ã¯ãã¹ã¿ã³ãã¢ãã³ãªãŒãµãªã³ã°ããŒã«ããšåŒãã§ããããããã®ã»ã¯ã·ã§ã³ã§æ€èšããŸãããã®éåžžã«éãããæ©èœãèãããšãDist :: Zillaãªãã§å®å šãªãªãŒãµãªã³ã°æ©èœãååŸããããã«ãä»ã®å°ããªãŠãŒãã£ãªãã£ïŒæ¬¡ã®ã»ã¯ã·ã§ã³ã§èª¬æïŒã䜿çšããŠã¿ãŸãã
ãŸã第äžã«ãCPANã®ã¢ãžã¥ãŒã«ãäœæããæãæå°éã®æ¹æ³ã¯æ¬¡ã®ãšããã§ãã
mkdir -p Example-MBtiny/lib/Example/ cd Example-MBtiny vi lib/Example/MBtiny.pm mbtiny dist
ãã®çµæã
Example-MBtiny-$VERSION.tar.gz
CPANã«ã¢ããããŒãã§ãããã®ãååŸããŸããã¢ãžã¥ãŒã«ãå«ããã£ã¬ã¯ããªã«ã¯ä»ã®ãã¡ã€ã«ã¯ãããŸãã
lib/Example/MBtiny.pm
ããã®ã¢ãŒã«ã€ãã®ã¿ãäœæãããŸãã
ä»ããäœæïŒãŸãã¯ä»»æã®ãŠãŒãã£ãªãã£ãçæããïŒGitHubã®äžã«ã¬ã€ã¢ãŠãå šãŠã®ã¢ãã³ãªã¢ãžã¥ãŒã«å ã«éåžžååšãããã¹ãŠã®æšæºã®ãã¡ã€ã«ïŒ
README.md
ã
LICENSE
ã
Changes
ã
t/*
ã
.gitignore
ã
.travis.yml
ã ãã§ãªãããªããžããªãäœæãããšãæã ã¯ãã¹ãŠã®ãããã®ãã¡ã€ã«ã«è¿œå ããGitHubã®äžã§èšå ¥ããŠãã ããã
次ã®è³ªåã¯ãã©ã®ã¹ã¿ã€ã«ã䜿çšãããã§ã
mbtiny
ã
-
mbtiny test
mbtiny dist
, ,Build.PL
,MANIFEST
META.{json,yml}
. , CPAN, âcpanm
- pull-request. - â
mbtiny regenerate
Build.PL
,MANIFEST
META.{json,yml}
. , , â .
GitHubã䜿çšããå Žåããããžã§ã¯ãã«è¿œå ããå¿ èŠããã
metamerge.json
ããã®å 容ã¯çæäžã«èæ ®ãããŸã
META.{json,yml}
ïŒ
{ "resources" : { "bugtracker" : { "web" : "https://github.com/powerman/Example-MBtiny/issues" }, "homepage" : "https://github.com/powerman/Example-MBtiny", "repository" : { "type" : "git", "url" : "git://github.com/powerman/Example-MBtiny.git", "web" : "https://github.com/powerman/Example-MBtiny" } } }
æ°ããããŒãžã§ã³ããªãªãŒã¹ãããšããè¿œå ã®ãŠãŒãã£ãªãã£ã圹ç«ã¡ãŸãã
# update dependencies scan-prereqs-cpanfile >cpanfile # ... update META.* from cpanfile if you added META.* into the repo mbtiny regenerate # build & test mbtiny test # update version everywhere ver=1.2.3 perl-reversion -set $ver # don't forget to update version & date vi Changes # regenerate README.md with badges cp BADGES.md README.md pod2markdown lib/Example/MBtiny.pm >> README.md # release git commit -a -m "release $ver" git tag $ver git push mbtiny dist cpan-upload Example-MBtiny-$ver.tar.gz
ã芧ã®ãšãããæ¯åããããã¹ãŠæåã§è¡ãããšã¯è¯ãèãã§ã¯ãããŸãããäœããå¿ããŠããŸããã©ããã§ééããããŸãããããããããã¹ã¯ãªããã«ããããšã¯é£ãããããŸããããã®ãããªåçŽãª2ã€ã®ã¹ã¯ãªããïŒãã®ã¹ã¯ãªãããšãã³ãã¬ãŒãã«ãã£ãŠæ°ããã¢ãžã¥ãŒã«ã®ã¹ã±ã«ãã³ãäœæããã¹ã¯ãªããïŒã¯ãDist :: Zillaãªãã§ææ°ã®ã¢ãžã¥ãŒã«ãäœæããã®ã«ååã§ãã
ãŸãšã
- å€ãããŒãžã§ã³ã®çç ãç·æ¥ã«ãµããŒãããå¿
èŠããªãå Žåãç§ã®æèŠã§ã¯ãã¢ãžã¥ãŒã«ã¯ããã©ã«ãã§äœ¿çšãããã¹ãã§ã
use 5.010001;
- 圢åŒã䜿çšããŠããŒãžã§ã³ãèšå®ãã
our $VERSION="v1.2.3";
- ããŒã«ã§å¯èœãªéãã»ãã³ãã£ãã¯ããŒãžã§ãã³ã°ã®ä»æ§ã«æºæ ãã
- ã¢ã«ãã¡ããŒãžã§ã³ã®å Žå
"-TRIAL"
ãããŒãžã§ã³çªå·ã«ã¢ã³ããŒã¹ã³ã¢ã䜿çšãã代ããã«ãã¢ãžã¥ãŒã«ã®ã¢ãŒã«ã€ãåã®ããŒãžã§ã³ã®åŸã«è¿œå ããŸã
- Module :: Build :: TinyãŸãã¯Module :: Buildããã«ãã·ã¹ãã ãšããŠäœ¿çšããŸãïŒååãªMBTæ©èœããªãå Žåã®ã¿ïŒ
- äŸåé¢ä¿ã管çããããã«
cpanfile
- ã¢ãžã¥ãŒã«ãgithubã«ä¿æããgithubãžã®ãªã³ã¯ãæå®ããŸã
META.json
- Travis CIã䜿çšãã
ãªãŒãµãªã³ã°çšã®ãŠãŒãã£ãªãã£ã®éžæã«é¢ããŠã¯ãæ確ãªæšå¥šäºé ãæ瀺ããããšã¯å°é£ã§ããæŸæ£ãããŠããªããã®ãéžæããå ŽåïŒ
- Minillaãããã©ã«ãã®äœæ¥ãé©åã§ãããäœããã®åœ¢ã§èšå®ããå¿ èŠããªãå Žå
- Dist :: MillaãMinillaã奜ãã§ããããäœããæ§æãããå ŽåããŸãã¯Dist :: Zillaã䜿ãå§ããŠããã©ã°ã€ã³ã®éžæãããªãé©åã§ææžåãããŠããå Žå
- ã¢ããª:: ModuleBuildTinyããã€ã¯ããã°ããã·ã³ãã«ãã€æè»ã«ã«ã¹ã¿ãã€ãºãããå Žå
ã¢ãžã¥ãŒã«äœæè åãã®ããŸããŸãªãŠãŒãã£ãªãã£
- CPANãã£ã¹ããªãã¥ãŒã·ã§ã³ã®ãã¡ã€ã«ã¯äœã§ããïŒ
- 泚éä»ãã®ã©ã³ã«ã¹ã¿ãŒã³ã³ã»ã³ãµã¹
- CPAN Authors FAQ
- ã¯ã¯ãªãã£ãŒææš
- ã¡ã¿CPANã説åŸããŠããã£ã¹ããªãã¥ãŒã·ã§ã³ã®ããŒãžã§ã³ç®¡çã·ã¹ãã ãžã®ãªã³ã¯ã衚瀺ããæ¹æ³ã¯ïŒ
- Minilla-CPANã®é åžã·ã¹ãã @ Pragmatic PerlïŒ14
- ãã¡ã€ã«åœ¢åŒã®ä»æ§ã®å€æŽ
- METAã®ä»æ§*ãã¡ã€ã«
______________________