in reply to Re: Creating a pseudo-module/package on a remote (CGI) server?
in thread Creating a pseudo-module/package on a remote (CGI) server?

Aha! Thanks for your reply. My scripts are in "/cgi-bin" but I can access "/" (non web-accessible) so I could create a subdir there called modules and upload my newly created *.pm files just fine. I didn't realise that I could use modules in this way - everything I read stated I had to install them first, which I can't do as stated. I shall have a look at BEGIN, @INC and "-|" as suggested, thanks!

But basically, you're saying I can simply upload them to a subdirectory as .pm, specify the modules folder local path as a lib, and then use "use" etc to access them exactly as if they were an installed module? Great!
  • Comment on Re^2: Creating a pseudo-module/package on a remote (CGI) server?

Replies are listed 'Best First'.
Re^3: Creating a pseudo-module/package on a remote (CGI) server?
by f00li5h (Chaplain) on Dec 21, 2006 at 10:23 UTC

    You may note that . disappears from @INC if you're running with taint checking, which you are forced to have when running as root ...

    Not that you'd ever dream of running your webserver or CGI scripts as root... but just so you know

    use lib 'lib'; seems a farily nice alternative (you can stick it at the top of your scripts, right where you've got use strict; use warnings;

    Throw those suckers into a skeleton script and you're away...

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;