Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to add path to @INC

by runrig (Abbot)
on May 20, 2016 at 22:10 UTC ( [id://1163694]=note: print w/replies, xml ) Need Help??


in reply to How to add path to @INC

What directory is TryCatch installed in? Add that directory to 'use lib' or PERL5LIB. That will add it to @INC. If it's not in INC, perl won't find it.

Replies are listed 'Best First'.
Re^2: How to add path to @INC
by TSN (Acolyte) on May 20, 2016 at 22:42 UTC
    The path of TryCatch is ~/.cpan/build/TryCatch-1.003002-0KBiDH/lib! I'm not trying to run a script, so 'use lib' doesnīt work in this case! When I add trough PERL5LIB the path doesn't appear in @INC when I try install a module with cpan, PERL5LIB only works if I run a script that's need that module! So, has to be another way!
      > The path of TryCatch is ~/.cpan/build/TryCatch-1.003002-0KBiDH/lib!

      It seems like the path where your CPAN client built it, but it should then be installed somewhere else - /opt/perl, /usr/lib/perl, /usr/local/, ~/perl5, etc. Try searching for TryCatch harder.

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
        I donīt know what to do with the comand that you post! How can I reinstall TryCatcher in other directory?

        When I try install it again through cpan I have the test failed:

        # Failed test 'use TryCatch;' # at t/catch_01.t line 6. # Tried to use 'TryCatch'. # Error: Can't locate Scope/Upper.pm in @INC (you may need to ins +tall the Scope::Upper module) (@INC contains: /home/uce/.cpan/build/T +ryCatch-1.003002-hybwUs/inc /home/uce/.cpan/build/TryCatch-1.003002-h +ybwUs/blib/lib /home/uce/.cpan/build/TryCatch-1.003002-hybwUs/blib/ar +ch /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux /usr/local/lib/ +perl5/site_perl/5.24.0 /usr/local/lib/perl5/5.24.0/x86_64-linux /usr/ +local/lib/perl5/5.24.0 .) at /home/uce/.cpan/build/TryCatch-1.003002- +hybwUs/blib/lib/TryCatch.pm line 13. # BEGIN failed--compilation aborted at /home/uce/.cpan/build/TryCatch- +1.003002-hybwUs/blib/lib/TryCatch.pm line 13. # Compilation failed in require at t/catch_01.t line 6. # BEGIN failed--compilation aborted at t/catch_01.t line 6. # Tests were run but no plan was declared and done_testing() was not s +een. # Looks like your test exited with 255 just after 1. FAILED--Further testing stopped: Cannot load TryCatch make: ** [test_dynamic] Erro 255 ASH/TryCatch-1.003002.tar.gz one dependency not OK (Scope::Upper); additionally test harness failed /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports ASH/TryCatch-1.003002.tar.gz Failed during this command: VPIT/Scope-Upper-0.28.tar.gz : make NO ASH/TryCatch-1.003002.tar.gz : make_test NO one depen +dency not OK (Scope::Upper); additionally test harness failed

        The Scope::Upper module is already installed too but in the directory ~/.cpan/build/Scope-Upper-0.28-DoTw6Z/lib

        What should I do to make it in the right directory

        I see! Well, can you tell me how shall I proceed to install it in the directory e.g. /usr/lib/perl? How can I make this test right?:
        Running make test "/usr/local/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' + -- TryCatch.bs blib/arch/auto/TryCatch/TryCatch.bs 644 PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "-MT +est::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, ' +inc', 'blib/lib', 'blib/arch')" t/catch_01.t t/context.t t/destroy.t +t/handwritten.t t/invalid.t t/method.t t/mx_types_structured.t t/nest +ed.t t/simple.t t/types.t t/xml_sax_expat.t t/catch_01.t ............. 1/? Bailout called. Further testing stoppe +d: Cannot load TryCatch # Failed test 'use TryCatch;' # at t/catch_01.t line 6. # Tried to use 'TryCatch'. # Error: Can't locate Scope/Upper.pm in @INC (you may need to ins +tall the Scope::Upper module) (@INC contains: /home/uce/.cpan/build/T +ryCatch-1.003002-hybwUs/inc /home/uce/.cpan/build/TryCatch-1.003002-h +ybwUs/blib/lib /home/uce/.cpan/build/TryCatch-1.003002-hybwUs/blib/ar +ch /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux /usr/local/lib/ +perl5/site_perl/5.24.0 /usr/local/lib/perl5/5.24.0/x86_64-linux /usr/ +local/lib/perl5/5.24.0 .) at /home/uce/.cpan/build/TryCatch-1.003002- +hybwUs/blib/lib/TryCatch.pm line 13. # BEGIN failed--compilation aborted at /home/uce/.cpan/build/TryCatch- +1.003002-hybwUs/blib/lib/TryCatch.pm line 13. # Compilation failed in require at t/catch_01.t line 6. # BEGIN failed--compilation aborted at t/catch_01.t line 6. # Tests were run but no plan was declared and done_testing() was not s +een. # Looks like your test exited with 255 just after 1. FAILED--Further testing stopped: Cannot load TryCatch make: ** [test_dynamic] Erro 255 ASH/TryCatch-1.003002.tar.gz one dependency not OK (Scope::Upper); additionally test harness failed /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports ASH/TryCatch-1.003002.tar.gz Failed during this command: VPIT/Scope-Upper-0.28.tar.gz : make NO ASH/TryCatch-1.003002.tar.gz : make_test NO one depen +dency not OK (Scope::Upper); additionally test harness failed
        Sorry about my ignorance!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1163694]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-23 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found