Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Thoughts on script portability

by Vautrin (Hermit)
on Jan 24, 2004 at 23:21 UTC ( [id://323889]=note: print w/replies, xml ) Need Help??


in reply to Thoughts on script portability

# You don't have shell access to the target machine? I have developed code for clients where this was the case and have had to do some fancy footwork to solve the problem

As you have always mentioned you can BEGIN { unshift @INC, "/path/to/Modules"; } on all your scripts and create your own modules directory. If you are talking about modules that need to be compiled you can always cross compile on your machine (statically link the libraries!!!!!!!) and upload them. This can be a royal PITA though. Also remember that running shell escapes (i.e. system and `s) are not always verboten on machines like they should. You can use this to give yourself pseudo-shell access.

Your other points, i.e. making it impossible to figure out enough information from the server or not having compilation tools can make it impossible to install your own modules pretty much means you have to take a hike. Vote with your feet and go somewhere else. Any client who wants a perl solution should usually be more then willing to make a perl solution feasible. If they make it impossible (which is possible) you pretty much have to walk.

Replies are listed 'Best First'.
Re: Re: Thoughts on script portability
by blue_cowdawg (Monsignor) on Jan 24, 2004 at 23:39 UTC

        you can BEGIN { unshift @INC, "/path/to/Modules"; } on all your scripts

    Actually had a case where that didn't work either. The hosting site had set the CGI environment in such a way that it could not see outside of a very limited environment similar to a chroot environment in Unix. Other than d:\path\perl or e:\cgi-bin was invisible.


    Peter L. Berghold -- Unix Professional
    Peter at Berghold dot Net
       Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.

      Even if you are jailed (chrooted) into the CGI directory you should still be able to create a directory (even over FTP -- unless the servers are so locked down that you can't even upload files ;-D), and then use "./modules" (or whatever) as the path to the modules. Of course, that's on a Windows, server, correct? Hmmmm. I suppose worst case scenario you could just keep all the modules in the current directory.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://323889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-25 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found