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!');
shinjuo
  • 20,498
  • 23
  • 73
  • 104
  • 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 – shinjuo Jan 13 '12 at 23:22
  • Did you use the `--add` parameter to PerlApp to add that module? A simple require isn't good enough... – Jonah Bishop Jan 13 '12 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. – derobert Jan 13 '12 at 23:41

2 Answers2

2

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

gangabass
  • 10,607
  • 2
  • 23
  • 35
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;

Jonah Bishop
  • 12,279
  • 6
  • 49
  • 74