Re: Perl install problems OSX 10.4.11

2009-09-12 Thread Mine

Hi,

Thanks for your excellent response, makes installing so easy assuming  
I did it correctly.
I think everything that was required is installed, but I am not sure  
everything was installed

in the right location.

It appears that Perl 5.10.1 was installed and all the modules I  
installed are associated with
Perl 5.10.1. When I try to run the get_iplayer PVR module I get the  
following error:
Can't locate loadable object for module HTML::Parser in @INC (@INC  
contains: /opt/local/lib/perl5/5.8.8/darwin-2level

(I have abbreviated the error message)

And when I enter perl -v  I get the following:
This is perl, v5.8.8 built for darwin-2level

So the system does not see the Perl 5.10.1 install. Can someone  
please tell me if there is a
was to install the modules so they relate to perl, v5.8.8, or point  
get_iplayer to use Perl 5.10.1.


Thanks,

Terrence



On 12 Sep 2009, at 05:02, Packy Anderson wrote:


On Sep 11, 2009, at 5:33 PM, Mine wrote:
I don't fully understand what Perl does but if Perl comes  
installed with OSX
it appears that I also have an install of Perl via MacPorts. I  
assume that

get_iplayer is looking at the preinstalled Perl but I am not sure.


Perl is a programming language, and it appears that get_iplayer is  
written in it.


The perl that comes installed with OS X is located at /usr/bin/ 
perl.  If you've also installed perl from some other source (like  
MacPorts) then you might have another perl at some other location.


I've taken a look at the iplayer source (available through http:// 
linuxcentre.net/getiplayer/) and it's definitely using the Perl  
that comes with OS X at /usr/bin/perl/


Although I am no expert, I have used the Terminal to install  
binaries before

so i will give it a go.


It's fairly simple.  Type

  sudo perl -MCPAN -e shell

At a Terminal prompt and enter in your password when prompted.   
You'll be asked to configure CPAN the first time you run it; just  
take the defaults and you'll be fine.  Then, once you get a cpan[1] 
 command prompt, type the following:


  cpan[1] install LWP

and hit enter.  It will automatically figure out what prerequisites  
you need and download all the packages.  Again, I generally take  
the defaults and everything works well.


-packy




Re: Perl install problems OSX 10.4.11

2009-09-12 Thread Doug McNutt
At 23:22 +0100 9/12/09, Mine wrote:
Hi,

Thanks for your excellent response, makes installing so easy assuming  I did 
it correctly.
I think everything that was required is installed, but I am not sure  
everything was installed
in the right location.

It appears that Perl 5.10.1 was installed and all the modules I  installed are 
associated with
Perl 5.10.1. When I try to run the get_iplayer PVR module I get the  following 
error:
Can't locate loadable object for module HTML::Parser in @INC (@INC  contains: 
/opt/local/lib/perl5/5.8.8/darwin-2level
(I have abbreviated the error message)

And when I enter perl -v  I get the following:
This is perl, v5.8.8 built for darwin-2level

So the system does not see the Perl 5.10.1 install. Can someone  please tell 
me if there is a
was to install the modules so they relate to perl, v5.8.8, or point  
get_iplayer to use Perl 5.10.1.



I suspect that Apple's perl is 5.8.8 and it is installed in /usr/bin. It needs 
to stay there because Apple's updates may depend on it. Installing 5.10.1 in 
/usr/bin/ replacing 5.8.8 is not recommended.

I also suspect that perl 5.10 is installed in /usr/local/bin but that might be 
different like /opt/bin depending on just how you installed it.. Look around 
for it. /opt/local/lib/ sounds unlikely to me.

You are probably going to make a change to your PATH environment variable to 
make the directory that perl 5,10 resides in appear before /usr/bin.

A shell command like: 
setenv PATH /usr/local/bin:$PATH  # csh

PATH=/usr/local/bin:$PATH   # something like this in bash
export PATH

You can also specify PATH in a startup file
$HOME/.MacOSX/environment.plist.
but you'll have to create that including the .MacOSX directory unless it's 
already there. There are some instructions on Apple's web site. Ask if you'd 
like a sample.

@INC is a perl array that lists directories in which modules can be found. 
There are a bunch of standard locations relative to the directory that perl 
itself lives in but you can add more directories by setting the PERL5LIB 
environment variable to a PATH-like list of other directories. That too can be 
done in environment.plist.

It's a bit hard to understand why iplayer doesn't have an installation script 
or at least some less geeky instructions for users.

-- 

-- A fair tax is one that you pay but I don't --