2013-09-23 133 views
2

我試圖下載,解壓縮,按照說明:如何在osx上安裝perl評論?

tar -zxf Perl-Critic-1.107_001.tar.gz 
    cd Perl-Critic-1.107_001 
    perl Makefile.PL 
    make 
    make test 
    make install 

當我到化妝步驟我得到:

/usr/bin/perl "-Iblib/arch" "-Iblib/lib" t/Variables/RequireLocalizedPunctuationVars.run.PL t/Variables/RequireLocalizedPunctuationVars.run 
Can't locate B/Keywords.pm in @INC (@INC contains: blib/arch blib/lib /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at t/Variables/RequireLocalizedPunctuationVars.run.PL line 16. 
BEGIN failed--compilation aborted at t/Variables/RequireLocalizedPunctuationVars.run.PL line 16. 
make: *** [t/Variables/RequireLocalizedPunctuationVars.run] Error 2 

我懷疑它,因爲我缺少的依賴。我也發現這個任務 - https://metacpan.org/pod/Task::Perl::Critic這似乎很有趣,但它沒有如何運行的方向。

---編輯 運行後 - 須藤CPAN任務:: Perl的::評論家

我得到這些結果:

Test Summary Report 
------------------- 
t/20_policies.t (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
t/pod.t   (Wstat: 512 Tests: 0 Failed: 0) 
    Non-zero exit status: 2 
    Parse errors: No plan found in TAP output 
Files=5, Tests=5, 0 wallclock secs (0.02 usr 0.01 sys + 0.08 cusr 0.01 csys = 0.12 CPU) 
Result: FAIL 
Failed 2/5 test programs. 0/5 subtests failed. 
make: *** [test_dynamic] Error 255 
    MARCELO/Perl-Critic-Itch-0.07.tar.gz 
    /usr/bin/make test -- NOT OK 
//hint// to see the cpan-testers results for installing this module, try: 
    reports MARCELO/Perl-Critic-Itch-0.07.tar.gz 
Running make install 
    make test had returned bad status, won't install without force 
Running Build for T/TH/THALJEF/Task-Perl-Critic-1.008.tar.gz 
    Has already been unwrapped into directory /Users/joelnylund/.cpan/build/Task-Perl-Critic-1.008-g5bmDk 

    CPAN.pm: Going to build T/TH/THALJEF/Task-Perl-Critic-1.008.tar.gz 

Warning: Prerequisite 'Perl::Critic::PetPeeves::JTRAMMELL => 0.01' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'JTRAMMELL/Perl-Critic-PetPeeves-JTRAMMELL-0.03.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Dynamic => 0.05' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/Perl-Critic-Dynamic-0.05.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Test::Perl::Critic::Progressive => 0.03' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/Test-Perl-Critic-Progressive-0.03.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Compatibility => 1.000' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'ELLIOTJS/Perl-Critic-Compatibility-1.001.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Swift => 1.000003' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'ELLIOTJS/Perl-Critic-Swift-v1.0.3.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Lax => 0.007' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'RJBS/Perl-Critic-Lax-0.009.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Bangs => 1.00' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'PETDANCE/Perl-Critic-Bangs-1.10.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::More => 1.000' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'ELLIOTJS/Perl-Critic-More-1.000.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Tics => 0.005' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'RJBS/Perl-Critic-Tics-0.007.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic => 1.117' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/Perl-Critic-1.118.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Pulp => 3' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'KRYDE/Perl-Critic-Pulp-80.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Storable => 0' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'MATTD/Perl-Critic-Storable-0.01.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Test::Perl::Critic => 1.02' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/Test-Perl-Critic-1.02.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'criticism => 1.02' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/criticism/criticism-1.02.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::StricterSubs => 0.03' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'THALJEF/strictersubs/Perl-Critic-StricterSubs-0.03.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Nits => 1.000000' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'KCOWGILL/Perl-Critic-Nits-v1.0.0.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Warning: Prerequisite 'Perl::Critic::Itch => 0' for 'THALJEF/Task-Perl-Critic-1.008.tar.gz' failed when processing 'MARCELO/Perl-Critic-Itch-0.07.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited. 
Building Task-Perl-Critic 
    THALJEF/Task-Perl-Critic-1.008.tar.gz 
    ./Build -- OK 
Running Build test 
t/00_load.t .......... 1/1 # Testing Task::Perl::Critic 1.008 
t/00_load.t .......... ok 
t/98_pod_syntax.t .... ok 
t/99_pod_coverage.t .. skipped: Test::Pod::Coverage 1.00 requried to test POD 
All tests successful. 
Files=3, Tests=2, 0 wallclock secs (0.02 usr 0.01 sys + 0.07 cusr 0.02 csys = 0.12 CPU) 
Result: PASS 
    THALJEF/Task-Perl-Critic-1.008.tar.gz 
Tests succeeded but 18 dependencies missing (Perl::Critic::Storable,Perl::Critic::PetPeeves::JTRAMMELL,Perl::Critic::Dynamic,Test::Perl::Critic::Progressive,Test::Perl::Critic,Perl::Critic::Compatibility,Perl::Critic::Swift,Perl::Critic::Moose,Perl::Critic::Lax,criticism,Perl::Critic::Bangs,Perl::Critic::More,Perl::Critic::StricterSubs,Perl::Critic::Tics,Perl::Critic::Nits,Perl::Critic,Perl::Critic::Pulp,Perl::Critic::Itch) 
    THALJEF/Task-Perl-Critic-1.008.tar.gz 
    [dependencies] -- NA 
Running Build install 
    make test had returned bad status, won't install without force 
+4

使用'cpan'命令行程序來執行自動化安裝,它也會安裝依賴項:'sudo cpan Task :: Perl :: Critic' – amon

+1

您是否嘗試過使用CPAN shell? 'perl -MCPAN -e shell';接下來是'install Perl :: Critic'。它會爲你處理依賴關係。 – devnull

+0

試過了(sudo cpan Task :: Perl :: Criti)那現在,它做了很多工作,但結束了:Running Build安裝 make test已經返回不良狀態,不會強制安裝 – Joelio

回答

-4

好吧,看來可怕的建議是唯一一個工作,從評論我做的:

cpan 
force install Task::Perl::Critic 

而且它似乎工作至今。我已經審查了十幾Perl的文件,結果似乎是什麼我正在尋找...

+1

除了強制安裝的部分,即使沒有依賴關係安裝。你認爲沒有安裝這些依賴關係,一切都會神奇地工作嗎? **有測試的原因是爲了讓你有理由認爲代碼可以工作。**你忽略了這一點,當你遇到失敗的情況時,你會得到「強制安裝」惹的禍。 –

+0

嗨安迪,你沒有提供任何解決方案,這使得該工具的工作,我同意有一些timebomb某處,但我沒有另一種嘗試。我使用安裝輸出更新了票據。 – Joelio

+0

解決方案是嘗試安裝Task :: Perl :: Critic,如果失敗,向我們顯示來自失敗部分的錯誤消息,以便我們可以幫助您診斷它。您沒有向我們顯示任何錯誤消息。該安裝將安裝許多模塊,其中一個失敗,但您沒有向我們展示哪一個失敗,或者失敗時收到了什麼錯誤消息。 –

7

你可能不想安裝Task::Perl::Critic。它包含一些插件,其他策略由其他作者編寫。其中一些會相互衝突(即遵守一種違反另一種的手段)。根據上面顯示的錯誤消息,這些插件是測試失敗的根源,而不是Perl::Critic本身。

單獨安裝Perl::Critic應該足夠了。正如其他人所建議的,使用cpan實用程序:

sudo cpan Perl::Critic 

這將需要所有依賴於你的照顧。