t/01-ListOperations.t ..................... Can't locate object method "new" via package "Net::Amazon::MechanicalTurk::Transport::RESTTransport" at /Users/dviner/.cpan/build/Net-Amazon-MechanicalTurk-1.01-1kIAvQ/blib/lib/Net/Amazon/MechanicalTurk/Transport.pm line 21.
This error message was repeated a few dozen times. Also, in searching for the problem, I found this StackOverflow issue: Perl module Net::Amazon::MechanicalTurk failing tests.
I find it pretty amazing that Amazon hasn't fixed this problem. But, after doing a bunch of searching and sniffing around, I couldn't find any solution at all.
So, I made one of my own. Here's a short patch that will allow the Net::Amazon::MechanicalTurk module pass all it's tests. Most will be skipped with the message:
skipped: Configure Amazon AWS Authentication to enable tests against Mechanical Turk Sandbox
If you want to try to get those to verify, you must make a file named mturk.properties in the current directory. In that file, you must list your access key and secret key as well as the turk service URL and API version you are using. Here are the sample contents:
Note that even with this file in place, several of the tests still fail. I'm not an expert on the Turk API (yet), so I'm not sure how to fix the other errors that occur.
But hopefully this patch will help people. Feel free to contact me if you find additional changes that should be made to the library.