what you wish for can be done, it's just not easy to do nor to explain.
the basic idea goes like this.
- build on a development machine. you need to match architecture and OS.
- build the needed libraries. static is best unless you want real pain.
- build the perl module so that it uses the static library and installs
in it's own directory.
- copy your directory of perl modules up to your web space and use them
from your scripts.
sounds easy, and sometimes it is.
$ cd /tmp/libfoo-0.0.1
$ ./configure --prefix=/tmp/support
$ make
$ make install
$ ls /tmp/support/lib
libfoo.a libfoo.so libfoo.so.1
$ rm /tmp/support/libfoo.so*
$ cd /tmp/Foo-0.0.1
$ perl Makefile.PL PREFIX=/tmp/support
$ make
$ make test
$ make install
$ scp -r /tmp/support/lib/perl5 me@provider:public_html/
$ cat >/tmp/test.pl
#!/path/to/providers/perl
use lib '/path/to/me/public_html/perl5';
use Foo;
print "Content-type: text/plain\r\n\r\nWoot!";
^D
$ chmod ugo+rx /tmp/test.pl
$ scp /tmp/test.pl me@provider:cgi-bin/
cross fingers and try it out. be warned, it can be much harder than this would suggest and it's better to try it local first to make sure it works. be prepared for pain.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|