Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/

by roboticus (Chancellor)
on Oct 26, 2017 at 13:31 UTC ( [id://1202067]=note: print w/replies, xml ) Need Help??


in reply to Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/

Nanjizal:

I looked through the makefile to see where CacheMemory.pm was used after Gofer/Policy/Base.pm and couldn't find that sequence. I didn't see anything obvious in the makefile. (I've not debugged module installations in any detail, though, so not much would be obvious to me.)

(Note: By the way, putting the makefile in pastebin is considered bad form here, as the link could go stale and make this thread useless to future people with the same or similar problem. You ought to wrap the makefile in <readmore><code> ... </code></readmore> tags to keep the data in the node. This way, the makefile is available to anyone who needs to dig through it, but not force all that to be displayed unless someone really wants to see it.)

I don't have a system I can conveniently try to reproduce your problem, so I next looked at AutoSplit.pm and found the error message in the autosplit_file() subroutine, where the $file is an argument. It's called in two places (in v1.06 anyway): autosplit() and autosplit_lib_modules(). Since it seems likely that the second one is where the difficulty arises, I'd suggest putting print "<$_>\n"; just after the initial while statement so you can see what it's trying to do and see if there's some unusual filename that's confusing it. In cases like this, I'll frequently also drop a print "autosplit beg\n"; at the beginning of the subroutine and print "autosplit end\n"; at the end of the routine, just to put a "wrapper" around it to ensure that the error actually appears within the subroutine (rather than shortly afterwards, for example). That way, if the autosplit() call was the culprit rather than the suspected autosplit_lib_modules() subroutine, you'd see the error without the wrapper tags.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Perl DBI installation problem on MacOS Sierra - Can't open blib/lib/DBI/Util/
by Nanjizal (Novice) on Oct 26, 2017 at 17:47 UTC

    Hi roboticus,

    Many thanks for your reply, and apologies for the pastebin, I've now included the makefile below as suggested.

    Thank you for the suggestions regarding the autosplit module. Unfortunately, I don't know where to find that code to include your suggested edits. Do you know where I might find it?

      Nanjizal:

      It will be somewhere in your @INC path. I use cygwin which has a locate command, so I used locate to find it:

      $ locate AutoSplit locate: warning: database ‘/var/locatedb’ is more than 8 days old (act +ual age is 13.4 days) . . . C:/cygwin64\lib\perl5\5.22\AutoSplit.pm C:/cygwin64\usr\share\man\man3\AutoSplit.3pm.gz . . .

      You could likely find it by doing something like:

      $ perl -e 'for (@INC) { $t="$_/AutoSplit.pm"; print $t,"\n" if -e $t } +' /usr/lib/perl5/5.22/AutoSplit.pm

      Note: That would only work if AutoSplit happens to be at the root of a directory in @INC (which it is, in this case). A File::Find solution would be more general for locating files that might be deeper in the @INC directory hierarchy.

      Update: I second kcott's(++) suggest to use perlbrew. When I was using a Mac, it worked very well for me.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        Thanks roboticus.

        That's a bit outside my comfort zone for now, but hopefully one day I will get there!

        For the moment I am trying to install a recent Perl version using Perlbrew, as suggested by kcott, but have run into some difficulties getting it installed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found