Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Qiang (5577)

Qiang
  (email not shown publicly)
http://www.goodspot.ca/

Journal of Qiang (5577)

Wednesday February 21, 2007
04:28 PM

install Scalar::Util XS version.

[ #32464 ]
Weak references are not implemented in the version of perl that is the error i got when installing Task::Weaken (part of Perl::Critic prereq) which test if Scalar::Util has the XS weaken function. S::U on this system is pure-perl version. therefore the error msg.

the solution is to recompile Scalar::Util with XS support.

here is what i did to install Scalar::Util 's XS version to my HOME dir. soaris 8.

Scalar::Util uses Module::Install which uses $Config::Config{cc} which points to a non-existen location. %Config is read-only. ExtUtils::FakeConfig comes to rescue.

#pwd
/home/qiang/.cpan/build/Scalar-List-Utils-1.19

#cat my_Config.pmpackage my_Config;

use ExtUtils::FakeConfig cc => 'gcc';

1;

#perl -Mmy_Config Makefile.PL PREFIX=/home/qiang/perl/ INSTALLDIRS=site
#make LD=gcc
#make test
#make install

lesson learned: i was trying to test the 'weak' function in Scalar-List-Utils-1.19 built directory after make by running perl -e 'use Scalar::Util qw(weaken)' which always give me error saying 'weaken function is not implemented in this version of perl'.

after a few failed tries, i did

% perldoc -l Scalar::Utillib/Scalar/Util.pm

hmm. there is another copy of it under blib/.

% perl -e 'BEGIN{unshift @INC,"/home/qiangl/.cpan/build/Scalar-List-Utils-1.19/blib/lib"};use Scalar::Util qw(weaken)'

that worked. here I come, Perl::Critic

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.