use argを試す。(インストール編)
# cpan // YAML を先に入れた気がする install Module::Install $ perl Makefile.PL include /tmp/hato/p5-args/inc/Module/Install.pm String found where operator expected at Makefile.PL line 11, near "author_tests 'xt'" (Do you need to predeclare author_tests?) syntax error at Makefile.PL line 11, near "author_tests 'xt'" Execution of Makefile.PL aborted due to compilation errors. [http://d.hatena.ne.jp/magicalhat/20090121/1232523304:title] # cpan install Module::Install::AuthorTests $ perl Makefile.PL include /tmp/hato/p5-args/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm Cannot determine perl version info from lib/args.pm include inc/Module/Install/AuthorTests.pm include inc/Module/Install/Include.pm include inc/Test/More.pm include inc/Module/Install/WriteAll.pm include inc/Module/Install/Makefile.pm include inc/Module/Install/Win32.pm include inc/Module/Install/Can.pm include inc/Module/Install/Fetch.pm Warning: prerequisite Any::Moose 0 not found. Warning: prerequisite Carp::Assert 0 not found. Warning: prerequisite PadWalker 0 not found. Warning: prerequisite Scalar::Util 1.21 not found. We have 1.19. Writing Makefile for args Writing META.yml
なんかできた。でもなんか警告があるのでこれを潰す。
cpanでいちいちyesめんどくさい。
CPANモジュールのインストール時に自動でデフォルト選択をする方法 - Craftworks Tech Blog - Branch
# yes '' | cpan -i Any::Moose # yes '' | cpan -i Carp::Assert # yes '' | cpan -i PadWalker # yes '' | cpan -i Scalar::Util
$ sudo perl Makefile.PL include /tmp/hato/p5-args/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm Cannot determine perl version info from lib/args.pm include inc/Module/Install/AuthorTests.pm include inc/Module/Install/Include.pm include inc/Test/More.pm include inc/Module/Install/WriteAll.pm include inc/Module/Install/Makefile.pm include inc/Module/Install/Win32.pm include inc/Module/Install/Can.pm include inc/Module/Install/Fetch.pm Writing Makefile for args Writing META.yml $ sudo make cp lib/args.pm blib/lib/args.pm Manifying blib/man3/args.3pm $ sudo make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/*/*.t t/*/*/*.t xt/*.t t/00_compile.t .............. ok t/010_simple/01_basic.t ..... ok t/010_simple/02_type.t ...... ok t/010_simple/03_optional.t .. ok t/010_simple/04_default.t ... ok t/010_simple/05_methods.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 ................. skipped: Test::Pod 1.00 required for testing POD All tests successful. Files=9, Tests=11, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.34 cusr 0.03 csys = 0.41 CPU) Result: PASS $ sudo make install Installing /usr/local/share/perl/5.10.0/args.pm Installing /usr/local/man/man3/args.3pm Appending installation info to /usr/local/lib/perl/5.10.0/perllocal.pod
いきなりrootインストールというのもマズイのだろうか。こっちのほうがいいかもしれない。
$ mkdir ~/usr $ perl Makefile.PL -S PREFIX=$HOME/usr include /tmp/hato/p5-args/inc/Module/Install.pm include inc/Module/Install/Metadata.pm include inc/Module/Install/Base.pm Cannot determine perl version info from lib/args.pm include inc/Module/Install/AuthorTests.pm include inc/Module/Install/Include.pm include inc/Test/More.pm include inc/Module/Install/WriteAll.pm include inc/Module/Install/Makefile.pm include inc/Module/Install/Win32.pm include inc/Module/Install/Can.pm include inc/Module/Install/Fetch.pm Writing Makefile for args Writing META.yml $ make Manifying blib/man3/args.3pm $ make install Appending installation info to /home/hato/usr/lib/perl/5.10.0/perllocal.pod