Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath (cpanm PERL5LIB)

by Anonymous Monk
on Oct 06, 2013 at 21:29 UTC ( #1057194=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath
in thread Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath

What would you guys recommend to solve this problem? Where should the folders be located?

step 1) restore your system perl to the pristine condition that it was ; I can't help with exact steps, its macness :)

step 2a) maintain your own perl (easy) ( install CitrusPerl), this way you get a newer version of perl, and if apple-macness updates the system perl, you don't have to reinstall/recompile any modules, your perl remains untouched

step 2b) or maintain your own PERL5LIB with cpanm (like this cpanm --local-lib PERL5LIB export PERL_MB_OPT=--install_base /home/user/devstuff set PERL_MM_OPT=INSTALL_BASE=/home/user/devstuff)

get cpanm and install Web::Scraper into /home/username/myperllibs

curl -L http://cpanmin.us | perl - -v --local-lib /home/username/myperllibs App::cpanminus ExtUtils::MakeMaker Module::Build Web::Scraper

wget -O - http://cpanmin.us | perl - -v --local-lib /home/username/myperllibs App::cpanminus ExtUtils::MakeMaker Module::Build Web::Scraper

Then you can run perl -I/home/username/myperllibs/lib/perl5/CGI mypythonic.pl or

export PERL5LIB=/home/username/myperllibs/lib/perl5:$PERL5LIB export PATH=/home/username/myperllibs/bin;$PATH

perlbrew or perlall are workable alternatives somewhat automating one or more of the above steps

But when apple-macness updates the system perl, you'll have to recompile/reinstall any modules with binary components(.so/.xs files) not provided by apple-macness (anything with .xs/.sp files in your myperllibs)

step 3) If you were using a "word processor" switch to a "notepad" equivalent, or a programmers editor ( scite, textpad, gvim, emacs, padre )


Comment on Re^3: Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath (cpanm PERL5LIB)
Download Code
Re^4: Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath (cpanm PERL5LIB)
by Anonymous Monk on Oct 06, 2013 at 21:32 UTC
    grr, typo (rather obvious but still) -I/home/username/myperllibs/lib/perl5/CGI should be -I/home/username/myperllibs/lib/perl5
Re^4: Problem in using Web::Scraper, coming from HTML::TreeBuilder::XPath (cpanm PERL5LIB)
by sbasbasba (Initiate) on Oct 07, 2013 at 04:00 UTC

    The problem is I have no idea how to restore my Perl. I paid no attention at the beginning when installing modules, and I can't find anything online. I am sure both Web::Scraper and XPath are in the Perl folders under @INC{}; then why why why don't they work???

      I am sure both Web::Scraper and XPath are in the Perl folders under @INC{}; then why why why don't they work???

      It doesn't matter. Install them the way I explained.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-09-22 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (204 votes), past polls