Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-CampaignMonitor CPAN distribution.

Report information
The Basics
Id: 72069
Status: rejected
Priority: 0/
Queue: Net-CampaignMonitor

People
Owner: Nobody in particular
Requestors: steve [...] deefs.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.01
Fixed in: (no value)



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
Hi, I'm going to reject this ticket and create three new ones - one for each issue you have identified. Thanks for using the module. Jeffery On Mon Oct 31 10:11:27 2011, SSIMMS wrote: Show quoted text
> Hi, > > I'm starting to use Net::CampaignMonitor, and came across a few issues: > > 1) The documentation states (first section under Methods): >
> > 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