Skip Menu |

This queue is for tickets about the WWW-FreshBooks-API CPAN distribution.

Report information
The Basics
Id: 47438
Status: new
Priority: 0/
Queue: WWW-FreshBooks-API

People
Owner: Nobody in particular
Requestors: olaf [...] wundersolutions.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.1.0
Fixed in: (no value)



Subject: Dies when tested on default freshbooks accounts
When you create a new Freshbooks account, you get one client (John Smith, Sample Organization) by default. If you try to get a client list without adding additional clients, your script will die: Not an ARRAY reference at /usr/local/share/perl/5.10.0/WWW/FreshBooks/API.pm line 100. The following test will fail on a system with only one client: #!/usr/bin/perl use strict; use warnings; use Test::More qw( no_plan ); require_ok('WWW::FreshBooks::API'); my $conf = { ... }; my $fresh = WWW::FreshBooks::API->new({ svc_url => $conf->{'api_url'}, auth_token => $conf->{'auth_token'}, }); isa_ok( $fresh, 'WWW::FreshBooks::API' ); $fresh->call('client.list', {} );