[Pdx-pm] Why did this "force install" fix Kwiki?

Eric Wilhelm scratchcomputing at gmail.com
Sun Nov 11 00:38:57 PST 2007


# from Keith Lofstrom
# on Saturday 10 November 2007 23:04:

>The Util.so file is not listed in the error messages eructated by
> Kwiki that I posted earlier.  I'm glad you figured that out, but I am
> curious about how you did so.

Partly, "I already knew it" as chromatic points out.  The (often 
painful) way to learn something like this is approximately as follows:

The clue was: "Undefined subroutine &Scalar::Util::weaken" and thus 
(assuming that I knew that my 'use ...' statement was kosher (which can 
be assumed from the fact that it "used to work" and then "something 
changed")) my first step in troubleshooting is to run:

  edit $(which_module Scalar::Util)

And see this line:

  require List::Util; # List::Util loads the XS

Finding no 'sub weaken' in this file implies that it comes from said XS 
(which is munged into a .c and then becomes a .so once it is compiled.)

Aside: If you don't have which_module (from my svn), `perldoc -l 
Scalar::Util` will usually do.

If you get really puzzled, you run `cpan_get Scalar::Util`, unpack the 
tarball and grep for weaken.

I really need to put some of these scripts on CPAN, eh?  (That, or maybe 
just post a page of links to the 300+ scripts in my ~/.bin/ dir.)

$ for tool in which_module cpan_get linked_svn; do linked_svn info 
$(which $tool) | grep URL | sed 's/.*: //';done
http://scratchcomputing.com/svn/Module-Subversion-Juggle/trunk/bin/which_module
http://scratchcomputing.com/svn/code_utilities/trunk/bin/cpan_get
http://scratchcomputing.com/svn/Module-Subversion-Juggle/trunk/bin/linked_svn

--Eric
-- 
"I've often gotten the feeling that the only people who have learned
from computer assisted instruction are the authors."
--Ben Schneiderman
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the Pdx-pm-list mailing list