in reply to Get https simple solution desired
Hi, the code you provided works for me as is. I can also confirm that I have used LWP::UserAgent over https successfully. Many scripts are provided for doing that (e.g. see LWP not working with HTTPS protocol (SOLVED), I can include some when you confirm that indeed said module works for you at server.
I had problems with installing modules in web-hosting servers where you do not have shell access. As sundialsvc4 said you can upload those modules from your local computer install locations to any dir you own at the remote server and then include the path of said dir in your scripts like use lib 'PATH_TO_DIR'. I can confirm that this worked for me in similar settings and without shell access.
A key point here is to make sure that the path you think you uploaded modules to is what you use lib in your scripts. When you do not have shell access (ssh or telnet) to the server and therefore you can't just login and run your script from the shell, relative paths usually do not work because who knows where your script is executed from -- e.g. they may be executed as cgi-bins by the web-server. In this case prepare a test script and have it print out the complete path to the script like using __FILE__ or Cwd::getcwd(), see How to determine absolute path of current Perl file?
The next hurdle is that some modules include XS and require compilation or depend on other system-installed libraries (i mean binary libs not perl modules). In which case you can't simply ftp them over unless you are lucky and the architectures match. Note: you may go a bit further if you link statically. A wild guess would be that LWP depends on some SSL library for doing its https business.
You can sneak under the webmasters' nose and crawl the barbed wire a bit further by preparing a cgi-bin script which ... installs (as properly installs and not simply upload) and compile if necessary modules at the server by spawning a system command from a cgi-bin for cpanm. I leave this as an exercise to the intrepid reader but in my experience the web-server allocates a tiny allowance of cpu to your scripts and spawned system commands - if allowed at all to run - gradually become so nice they are irritating and, like Xeno, never arrive.
In any case your mileage may vary (I always wanted to write this)!
|
|---|