Skip to content

Help with using ninka #49

@enridaga

Description

@enridaga

I am trying to run the ninka script in bin following the readme notes but haven't succeeded.

I cloned the project on my mac-osx, where I have perl 5. When trying to run the file in bin simply

$ perl bin/ninka
Can't locate Ninka.pm in @INC (you may need to install the Ninka module) (@INC contains: /usr/local/opt/perl/lib/perl5/site_perl/5.36/darwin-thread-multi-2level /usr/local/opt/perl/lib/perl5/site_perl/5.36 /usr/local/opt/perl/lib/perl5/5.36/darwin-thread-multi-2level /usr/local/opt/perl/lib/perl5/5.36 /usr/local/lib/perl5/site_perl/5.36) at bin/ninka line 6.
BEGIN failed--compilation aborted at bin/ninka line 6.

Reading that (you may need to install the Ninka module), I tried to compile/install. I've seen a Makefile.PL, so I also tried following these instructions with no joy... see the following.

Step one works:

$ perl Makefile.PL 
Warning: prerequisite DBD::SQLite 0 not found.
Warning: prerequisite DBI 0 not found.
Warning: prerequisite IO::CaptureOutput 0 not found.
Warning: prerequisite Spreadsheet::WriteExcel 0 not found.
Warning: prerequisite Test::Pod 1.00 not found.
Warning: prerequisite Test::Strict 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Ninka
Writing MYMETA.yml and MYMETA.json

Make seems to work as well:

$ make
...
cp bin/ninka blib/script/ninka
"/usr/local/Cellar/perl/5.36.1/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ninka
Manifying 1 pod document
Manifying 8 pod documents

Make test fails miserably:

$ make test
PERL_DL_NONLAZY=1 "/usr/local/Cellar/perl/5.36.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/pod_ok.t .................... Can't locate Test/Pod.pm in @INC (you may need to install the Test::Pod module) (@INC contains: /Users/ed4565/Development/ninka/blib/lib /Users/ed4565/Development/ninka/blib/arch /usr/local/opt/perl/lib/perl5/site_perl/5.36/darwin-thread-multi-2level /usr/local/opt/perl/lib/perl5/site_perl/5.36 /usr/local/opt/perl/lib/perl5/5.36/darwin-thread-multi-2level /usr/local/opt/perl/lib/perl5/5.36 /usr/local/lib/perl5/site_perl/5.36 .) at t/pod_ok.t line 3.
BEGIN failed--compilation aborted at t/pod_ok.t line 3.
t/pod_ok.t .................... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/reference_licenses.t ........ Can't locate IO/CaptureOutput.pm in @INC (you may need to install the IO::CaptureOutput module) (@INC contains: /Users/ed4565/Development/ninka/blib/lib /Users/ed4565/Development/ninka/blib/arch /Library/Perl/5.30/darwin-thread-multi-2level /Library/Perl/5.30 /Network/Library/Perl/5.30/darwin-thread-multi-2level /Network/Library/Perl/5.30 /Library/Perl/Updates/5.30.3 /System/Library/Perl/5.30/darwin-thread-multi-2level /System/Library/Perl/5.30 /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level /System/Library/Perl/Extras/5.30 .) at /Users/ed4565/Development/ninka/blib/lib/Ninka/CommentExtractor.pm line 7.
BEGIN failed--compilation aborted at /Users/ed4565/Development/ninka/blib/lib/Ninka/CommentExtractor.pm line 7.
Compilation failed in require at /Users/ed4565/Development/ninka/blib/lib/Ninka.pm line 6.
BEGIN failed--compilation aborted at /Users/ed4565/Development/ninka/blib/lib/Ninka.pm line 6.
Compilation failed in require at /Users/ed4565/Development/ninka/bin/ninka line 6.
BEGIN failed--compilation aborted at /Users/ed4565/Development/ninka/bin/ninka line 6.

    #   Failed test 'stdout is as expected'
    #   at t/reference_licenses.t line 25.
    #          got: ''
    #     expected: '/var/folders/t0/6dry46x961xds6f9cb87z1c580sq3r/T/YmnZ7cSBpL/AAL;UNKNOWN;0;0;0;2;7;Copyright,AllRights-TOOLONG,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN'
    # Looks like you failed 1 test of 2.
t/reference_licenses.t ........ 1/96 
#   Failed test 'AAL'
#   at t/reference_licenses.t line 26.

(... many more like that)

Failed 3/3 test programs. 96/96 subtests failed.
make: *** [test_dynamic] Error 2

What's the fastest way to test the tool with some source code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions