Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
go ahead... be a heretic
 
PerlMonks  

Mac OSX Question

by RobertJ (Acolyte)
on May 28, 2005 at 16:37 UTC ( #461365=perlquestion: print w/ replies, xml ) Need Help??
RobertJ has asked for the wisdom of the Perl Monks concerning the following question:

I just upgraded from 10.2.8 to 10.4.1

Prior to the upgrade I had a number of Perl scripts that I used for backup that used two modules
use MacOSX::File::Copy; use File::Copy::Recursive;

These modules were installed under 10.2.8 in

"/Library/Perl/"

and are still there.

When I test one of the scripts I get the following error msg

Line 4: Can't locate MacOSX/File/Copy.pm in @INC (@INC contains: /Applications/Utilities/Bobs_Scripts/Scripts/BckUps /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.
I get no error for the File::Copy::Recursive module. Any thoughts?

Comment on Mac OSX Question
Select or Download Code
Re: Mac OSX Question
by donarb (Beadle) on May 28, 2005 at 17:37 UTC
    Mac OS X 10.2.4 has a different version of Perl than 10.4 (5.8.0 I believe versus 5.8.6 in Tiger). Since MacOSX::File::Copy uses some compiled code, you'll need to reinstall that from CPAN. I think that the reason that File::Copy::Recursive works is that it is part of the base install of Perl so it is up to date.
      The module would definately need to installed, because 10.2 shipped with perl 5.6.0, so if there is any xs code, it needs to be recompiled.
Re: Mac OSX Question
by kyoshu (Curate) on May 28, 2005 at 17:53 UTC
    i have 10.3.9 macosx with perl v5.8.1-RC3
    and those modules are not in the default installiation
    of perl, and while you upgraded macosx itself, you got
    new version of perl, without modules you had installed
    before upgrade, i usualy have the same problem after
    upgrading perl on my freebsd box, i just reinstall
    modules via ports or cpan shell, you should do the same.
    using cpan shell, i gues is the best way for you.
    
    
    
    you can read about installing perl modules there
      I tried the reinstall but it didn't work???

      In the meantime I'm using Applescripts to do the same thing and invoking the unix shell from the AppleScripts to do things that are clumsy in AS.

      Note, with regard to the recursive copy module, I have modified it to use MacOSX copy to insure that the meta data AND the files are copied. The recursive copy module only copies the file info.

      Thanks for the comments.
        Try going in and manually deleting the files in the old tree. Then rerun the install. Perl might still be seeing the old version.

        5.6 and 5.8 are not binary compatible, so you're likely to run into this with other modules as well. You'll have to manually delete those modules to install the new ones successfully.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-04-20 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls