http://www.perlmonks.org?node_id=1057194


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 )