Subject: | Documentation bug and gotchas |
Hi,
I'm starting to use Net::CampaignMonitor, and came across a few issues:
1) The documentation states (first section under Methods):
Show quoted text
> All methods return a hash containing the Campaign Monitor response
> code, the headers and the actual response.
>
> my %results = (
> code => '',
> response => '',
> headers => ''
> );
They actually return hashrefs.
2) The API calls take hashes, but the doubled parentheses in many
examples makes it look like they take hashrefs (you have to look closely
to see that it's a redundant parenthesis and not a brace), which tripped
me up, especially since the new() method *does* require a hashref. I'd
recommend removing the extra parentheses.
3) It's not clear from the documentation what happens if the request
times out. Looking through the source code and the REST::Client
documentation, I *think* it fakes a 500 response (which isn't
appropriate, but that's an issue with REST::Client and not your module),
but I haven't confirmed that yet. I'd recommend checking to see how the
module handles timeouts, ensuring that it doesn't die, and documenting
the behavior.
Thanks for putting together the module, and I hope these suggestions
help.
Steve Simms