Issues with compiling perl script into executable

626 views Asked by At

I am trying to compile the perlscript below using activestate perlapp. I dont think it has anything to do with the PerlApp program. It runs fine when I just debug and run through activestate

this is the error when I try to compile it into an executable file.

Can't locate LWP/UserAgent.pm in @INC (@INC contains:) at (eval 38) line 2. BEGIN failed--compilation aborted at (eval 38) line 2. at twittertest.pl line 3

Here is the short code:

use Net::Twitter::Lite;

my $nt = Net::Twitter::Lite->new(
      traits   => [qw/OAuth API::REST/],
  consumer_key        => 'PEA',
  consumer_secret     => 'M6tDj7MFsuqeyxjOYhzFJR8',
  access_token        => '460868284-oMUErVuM86yT2Q38LAspU3',
  access_token_secret => 'gteAqdgthMjMVtE8'
);

  my $result = $nt->update('Hopefully One Final App Test!');
2

There are 2 answers

0
gangabass On BEST ANSWER

Right-click the Added modules container (on the Files tab) to add LWP::UserAgent module.enter image description here

0
Jonah Bishop On

I'm not a PerlApp expert, but this may be the solution you're looking for. From the PerlApp overview:

When requiring modules, be sure to use the --add option to list additional modules for PerlApp to traverse. Simple require statements (see below) do not contain enough information for PerlApp to load the necessary module(s).

require $module;