I have a perl application that sends a XMLRPC request to a server, and in return, expects a token generated by the server. The problem lies in that the application behaves differently when it was still a perl program (.pl) VS. after it was converted to an executable (.exe) Here is where the problem is, the perl app xmlrpc_test.pl sends my login info as follows
use XML::RPC; .... my $server = "https://...."; my $xmlrpc = XML::RPC->new($server); my $user = "userid"; my $password = "password"; my @args = ($user, $password); my $token = $xmlrpc->call("login", \@args); ....
And if I were to run this perl app directly, I get a token without a problem. But if after I tried packing it with PP (i'm calling wxpar here because the front GUI is done with Wx):
wxpar -M XML::TreePP -M LWP::UserAgent -M HTTP::Lite -o xmlrpc_test.ex +e xmlrpc_test.pl
From commandline I get the following output:
no data at XML/RPC.pm line 255
And the .exe exits/crashes. From what I find out, XML::RPC call function returned a null in the $response variable, which is what caused the error. Did I miss including a package via the -M fields? The PP ran without any problems and the .exe was successfully generated. Everything runs well except when it comes to send the XMLRPC request... The most puzzling is why it works in .pl form and not in .exe form... Any help is appreciated!

In reply to Perl PP/PAR packaged executable can't send XML::RPC requests by mephesis

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.