in reply to Re^6: SQLite + free web hosting?
in thread SQLite + free web hosting?

Yup. You can adjust @INC by using env var PERL5LIB or by using the lib module.

For example, to install a module, I do

perl Makefile.PL PREFIX=~ LIB=~/lib/perl5 make make test make install
and I have the following in my ~/.bash_profile
export PERL5LIB=~/lib/perl5

But you can use lib in your script instead of using PERL5LIB.

If it's a Windows host, you just grab a ppd file, unzip it (I think) and use use lib.

Replies are listed 'Best First'.
Re^8: SQLite + free web hosting?
by VMat (Novice) on Apr 14, 2009 at 00:00 UTC
    OK, I'll give it a try.

    Thanks for your patience!

    VMat

Re^8: SQLite + free web hosting?
by VMat (Novice) on Apr 21, 2009 at 22:36 UTC
    Hey ikegami, are you still there?

    I'm afraid I've picked the wrong hosting. Do they usually have a console available, where you can run system commands, in order to compile perl? This one doesn't, apparently. I don't even know what operating system they use (I believe it's Linux).

    (EDIT) I've just tried to add "use lib '.';" to a working script, it gave me an error page. I'm not sure if the compiler will be useful anyway.

    Again, I'd like a suggestion.

    Thank you,

    VMat

      If it's linux, it should have Perl already installed. As for compiling modules, you don't need a console for that. Run the commands from a CGI script.

      #!/bin/sh echo Content-Type: text/plain echo trap 'echo ERROR = $? ; exit $?' ERR exec 2>&1 WORKDIR=~/work # Where the .tar.gz is located DIST=DBD-SQLite-1.23.tar.gz cd $WORKDIR tar xvzf $DIST mkdir -p ~/lib/perl5 perl Makefile.PL PREFIX=~ LIB=~/lib/perl5 make test install

      They might remove your access to Perl, but that would be odd if they allow CGI. More likely would be the lack of access to make, the compiler and the Perl header files.

      it gave me an error page. I'm not sure if the compiler will be useful anyway.

      You'll need to check the error logs or use the following to get the error.

      use CGI::Carp qw( fatalsToBrowser );