Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm using PDK to generate a small executable utilizing the Net::Twitter module. The script runs fine on my local machine but complains when I launch the executabel created with PDK. The error is:
Unable to load HMAC_SHA1 plugin at ... Net/Twitter/Role/OAuth.pm line +93
I'm assuming this is a missing module from my script but can't seem to track it down.

I've tried adding Digest::SHA1 but still the same.

Any thoughts?

Thanks, Paul

Replies are listed 'Best First'.
Re: Missing Module from Net::Twitter::Role::OAuth ?
by Marshall (Canon) on Sep 03, 2010 at 20:52 UTC
    You don't say what version of PDK you are using. The latest version is pretty good at finding and including dependencies. Earlier versions require more guesswork and iterations!

    I suspect that the problem you are having is that when you run the script from source code, the autoloader is able to make something available "automagically" that wasn't immediately apparent from the source code. When the .exe got made PDK didn't realize and include this run-time dependency.

    I've found the easiest way is add "use" statements to the source code rather than trying to mess with options to force inclusion of a module. There is a Digest::HMAC_SHA1 module. I suspect adding a "use Digest::HMAC_SHA1;" statement is going to help.

    If you are at a company (costs a some money), move up to PDK 9.

    Oh, you mentioned "small exe" - not sure what you meant by that. I always build standalone .exe's although it is possible to build smaller ones that have dependencies. Make sure that you can successfully make (and run) a standalone one before trying to build something else.