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)!


In reply to Re: Get https simple solution desired by bliako
in thread Get https simple solution desired by tbone654

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.