[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] add a statically-linked module?



Folks,

This seems to be a quiet list but this question seems appropriate...

I'm running WebTen 2.1 on a test Mac server. (Actually, an interim setup
until we get a Solaris box configured and tested.) WebTen has perl
built-in but I wanted to use LWP::UserAgent. I set up a user library
directory and included a 'use lib...' line in my script. The script simply
retrieves a Web page. I'm testing. I had 'fatalsToBrowser' from CGI::Carp
enabled.

I received an error that this version of perl doesn't support dynamically
linked libraries and I should recompile or statically link the libraries.
WebTen 3.0 is in beta will add the capability but I'm looking to get
something working more quickly. So, I'm interested in the latter
recommendation. The problem seems to be that AutoLoader is called
somewhere in the process. I added a 'use MIME::Base64;' line in the
script for the module but it complained about with no change in behavior.
I'll include the error message below.

Any tips would be appreciated.

Paul
----

-----
Software error:

Can't load module MIME::Base64, dynamic loading not available in this
perl. (You may need to build a new perl executable which either supports
dynamic loading or has the MIME::Base64 module statically linked into it.)
at /usr/local/etc/httpd/cgi-bin/wwd.cgi line 11
-----

Here's the sample script for requesting a page restricted by Basic
Authorization from 'lwpcook.pod'

#---
#!/usr/bin/perl -w

use strict;
use LWP::UserAgent;

use vars qw{$ua $req};

$ua = new LWP::UserAgent;
$req = new HTTP::Request GET => 'http://www.sn.no/secret/';

$req->authorization_basic('aas', 'mypassword');

print $ua->request($req)->as_string;

#---


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org