0

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!');
3
  • and the access numbers and token numbers are not the correct ones so this wont work if you just copy and paste it. I am just not sure what the error is caused from Commented Jan 13, 2012 at 23:22
  • Did you use the --add parameter to PerlApp to add that module? A simple require isn't good enough... Commented Jan 13, 2012 at 23:36
  • 1
    @shinjuo: I suggest that instead of replacing your tokens with random strings, replace them with 'REDACTED', 'SEKRET', 'PASSWORD', or similar, then its immediately clear without having the read the comment. Commented Jan 13, 2012 at 23:41

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

1

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;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.