Try including those two modules in your exe by using the -M option: e.g. -M Module::Runtime.

Unfortunately PAR::Packer has a hard time with modules that are loaded dynamically. I've had good luck with using one command prompt with the portable version of Strawberry Perl running it's shell and another without. I run pp in the Strawberry shell and then test the exe in the non Strawberry shell. It sounds like you have installed Strawberry Perl so that won't work. But you might be able to find a way to run a command prompt and override the path so it can't find the Perl folders.

Update: The Perlmonks module review for PAR mentions using -M and the POD for pp explains the details, including using '*' to include multiple modules from a namespace.

Update 2: I'm getting the same error you posted: 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" at WWW/Salesforce.pm line 103. I created a simple two line program that just tries to log in with a fake test account.

use strict; use warnings; use WWW::Salesforce; eval { WWW::Salesforce->login( 'username' => 'test','password' => '123 +4' ); }; print "> $@ <\n" if $@;

The interesting thing is that there is no such thing as Socket.pm at "LWP::Protocol::https::Socket". I attempted to install that module when I noticed it was not on my system. When I run the script or the exe in the environment with Perl it works fine. I open a second command prompt and type set path=c:\temp. Then when I run the exe I get the error along with some popups about dlls I haven't linked yet.

I also found a Perlmonks node related to this error.


In reply to Re: Problems running a packaged script. by Lotus1
in thread Problems running a packaged script. by vitoco

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.