How to "use" all of libwww-perl-5.808 from a local install

How to "use" all of libwww-perl-5.808 from a local install

am 04.09.2007 22:31:04 von Amer Neely

I'm trying to get WWW::Mechanize to work on a client's server.

However, it requires newer versions of some modules than are installed,
so I'm trying to install them in a local directory myself. I don't have
shell access so this all has to be done via a Perl script.

Instead of installing numerous individual modules, I'm attempting to
install the newest libwww-perl-5.808:

#! /usr/bin/perl
use strict;
use warnings;
my @SysCmd;
@SysCmd=("perl -MCPAN -e 'install Bundle::LWP' PREFIX =
/home/user241/cgi-bin/PerlMods");

After running this little script, I try to run my original one:

#! /usr/bin/perl
use strict;
use warnings;
use lib '/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib';
use WWW::Mechanize;
..
..
..

but I get this error:
HTTP::Request version 1.3 required--this is only version 1.27 at
/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib/WWW/Mec hanize.pm
line 101.
BEGIN failed--compilation aborted at
/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib/WWW/Mec hanize.pm
line 101.
Compilation failed in require at test_mech.1.pl line 14.
BEGIN failed--compilation aborted at test_mech.1.pl line 14.

So, is there a way I can tell my script/s to use the local modules for
ALL of WWW::Mechanize?

--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"

Re: How to "use" all of libwww-perl-5.808 from a local install

am 04.09.2007 22:48:54 von Gunnar Hjalmarsson

Amer Neely wrote:
> ... I'm trying to install them in a local directory myself. I don't have
> shell access so this all has to be done via a Perl script.
>
> Instead of installing numerous individual modules, I'm attempting to
> install the newest libwww-perl-5.808:
>
> #! /usr/bin/perl
> use strict;
> use warnings;
> my @SysCmd;
> @SysCmd=("perl -MCPAN -e 'install Bundle::LWP' PREFIX =
> /home/user241/cgi-bin/PerlMods");

But that script doesn't change anything, does it?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: How to "use" all of libwww-perl-5.808 from a local install

am 04.09.2007 23:00:30 von Amer Neely

Gunnar Hjalmarsson wrote:
> Amer Neely wrote:
>> ... I'm trying to install them in a local directory myself. I don't
>> have shell access so this all has to be done via a Perl script.
>>
>> Instead of installing numerous individual modules, I'm attempting to
>> install the newest libwww-perl-5.808:
>>
>> #! /usr/bin/perl
>> use strict;
>> use warnings;
>> my @SysCmd;
>> @SysCmd=("perl -MCPAN -e 'install Bundle::LWP' PREFIX =
>> /home/user241/cgi-bin/PerlMods");
>
> But that script doesn't change anything, does it?
>

Well, it must have done something, because now I have ...

ftp> cd libwww-perl-5.808
250 "/cgi-bin/PerlMods/libwww-perl-5.808" is new cwd.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r-- 1 usr241 usr241 4088 Dec 8 2005 AUTHORS
-rw-r--r-- 1 usr241 usr241 92887 Aug 5 09:20 Changes
-rw-r--r-- 1 usr241 usr241 5384 Aug 5 09:19 MANIFEST
-rw-r--r-- 1 usr241 usr241 32061 Sep 4 16:02 Makefile
-rw-r--r-- 1 usr241 usr241 7699 Jul 19 16:45 Makefile.PL
-rw-r--r-- 1 usr241 usr241 3839 Dec 8 2005 README
-rw-r--r-- 1 usr241 usr241 1217 Dec 1 1999 README.SSL
drwxr-xr-x 2 usr241 usr241 4096 Sep 4 16:02 bin
drwxr-xr-x 9 usr241 usr241 4096 Sep 4 16:02 lib
-rw-r--r-- 1 usr241 usr241 9136 Nov 30 2004 lwpcook.pod
-rw-r--r-- 1 usr241 usr241 25458 Nov 30 2004 lwptut.pod
drwxr-xr-x 8 usr241 usr241 4096 Sep 4 16:02 t
-rw-r--r-- 1 usr241 usr241 1399 Jun 4 2006 talk-to-ourself

and under lib I have ...

ftp> cd lib
250 "/cgi-bin/PerlMods/libwww-perl-5.808/lib" is new cwd.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
drwxr-xr-x 2 usr241 usr241 4096 Sep 4 16:02 Bundle
drwxr-xr-x 2 usr241 usr241 4096 Sep 4 16:02 File
drwxr-xr-x 2 usr241 usr241 4096 Sep 4 16:02 HTML
drwxr-xr-x 5 usr241 usr241 4096 Sep 4 16:02 HTTP
drwxr-xr-x 4 usr241 usr241 4096 Sep 4 16:02 LWP
-rw-r--r-- 1 usr241 usr241 21427 Aug 5 09:23 LWP.pm
drwxr-xr-x 3 usr241 usr241 4096 Sep 4 16:02 Net
drwxr-xr-x 3 usr241 usr241 4096 Sep 4 16:02 WWW

--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"

Re: How to "use" all of libwww-perl-5.808 from a local install

am 04.09.2007 23:20:40 von Gunnar Hjalmarsson

Amer Neely wrote:
> Gunnar Hjalmarsson wrote:
>> Amer Neely wrote:
>>> ... I'm trying to install them in a local directory myself. I don't
>>> have shell access so this all has to be done via a Perl script.
>>>
>>> Instead of installing numerous individual modules, I'm attempting to
>>> install the newest libwww-perl-5.808:
>>>
>>> #! /usr/bin/perl
>>> use strict;
>>> use warnings;
>>> my @SysCmd;
>>> @SysCmd=("perl -MCPAN -e 'install Bundle::LWP' PREFIX =
>>> /home/user241/cgi-bin/PerlMods");
>>
>> But that script doesn't change anything, does it?
>
> Well, it must have done something, because now I have ...



Whatever you did to get those file there, you must have done something
else but running the above script. The above script only assigns a
string to the first element of the @SysCmd array...

Anyway, since you - one way or the other - seem to have installed the
LWP bundle, did you possibly forget to add the path to the 'use lib'
statement?

use lib (
'/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib',
'/home/usr241/cgi-bin/PerlMods/libwww-perl-5.808/lib',
);

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: How to "use" all of libwww-perl-5.808 from a local install

am 04.09.2007 23:44:54 von Amer Neely

Gunnar Hjalmarsson wrote:
> Amer Neely wrote:
>> Gunnar Hjalmarsson wrote:
>>> Amer Neely wrote:
>>>> ... I'm trying to install them in a local directory myself. I don't
>>>> have shell access so this all has to be done via a Perl script.
>>>>
>>>> Instead of installing numerous individual modules, I'm attempting to
>>>> install the newest libwww-perl-5.808:
>>>>
>>>> #! /usr/bin/perl
>>>> use strict;
>>>> use warnings;
>>>> my @SysCmd;
>>>> @SysCmd=("perl -MCPAN -e 'install Bundle::LWP' PREFIX =
>>>> /home/user241/cgi-bin/PerlMods");
>>>
>>> But that script doesn't change anything, does it?
>>
>> Well, it must have done something, because now I have ...
>
>
>
> Whatever you did to get those file there, you must have done something
> else but running the above script. The above script only assigns a
> string to the first element of the @SysCmd array...
>
> Anyway, since you - one way or the other - seem to have installed the
> LWP bundle, did you possibly forget to add the path to the 'use lib'
> statement?

Well, I'm no magician - really all I did was run that script from my
browser :) I had forgot to add
system(@SysCmd);

but it seems to have executed anyway.

>
> use lib (
> '/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib',
> '/home/usr241/cgi-bin/PerlMods/libwww-perl-5.808/lib',
> );
>

Anyway, you've answered my question - I did forget to 'use' the new
installation. Thanks ! Now all I'm getting for an error is
"No form defined at test_mech.1.pl line 29"

which I figure out from here.

--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"