Operating System - OpenVMS
1828406 Members
3136 Online
109977 Solutions
New Discussion

perl 5.6.1 and LWP::Simple for VMS

 
SOLVED
Go to solution
Randy Nelson_2
Occasional Advisor

perl 5.6.1 and LWP::Simple for VMS

Hi,

I would like to use LWP::Simple in a perl script, but my perl installation can't find the module. Does it exist for perl 5.6.1 on VMS? If so, how do I get it installed?

-Randy
4 REPLIES 4
Joseph Huber_1
Honored Contributor

Re: perl 5.6.1 and LWP::Simple for VMS

As far I know, there is nothing special for VMS.
Get it from CPAN and install as any other perl module.

I did not really testing and using much, but at least the example in the .pod file to get the LPW home-page is working for me:


use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent("$0/0.1 " . $ua->agent);
# $ua->agent("Mozilla/8.0") # pretend we are very capable browser

$req = HTTP::Request->new(GET => 'http://www.linpro.no/lwp');
$req->header('Accept' => 'text/html');

# send request
$res = $ua->request($req);

# check the outcome
if ($res->is_success) {
print $res->content;
} else {
print "Error: " . $res->status_line . "\n";
}



The above also contains the URL of the LWP home-page.
http://www.mpp.mpg.de/~huber
Craig A Berry
Honored Contributor
Solution

Re: perl 5.6.1 and LWP::Simple for VMS

I'll just add that the best place to start looking for Perl modules is generally

http://search.cpan.org

and you can find what you're looking for here:

http://search.cpan.org/~gaas/libwww-perl-5.803/

Some full binary Perl kits for Alpha that already include LWP and assorted other goodies are available on the latest freeware CD:

http://h71000.www7.hp.com/freeware/freeware70/perl/
Randy Nelson_2
Occasional Advisor

Re: perl 5.6.1 and LWP::Simple for VMS

Hi,

Thanks Craig, that was exactly what I needed.

The version on the V7 freeware works fine.

-Randy
Randy Nelson_2
Occasional Advisor

Re: perl 5.6.1 and LWP::Simple for VMS

Perl 5.8.4 on Freeware 7.0 has LWP:Simple