ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm trying to get Net::Stripe to work on my new server, using Perl v5.22.1. I have a *really* annoying issue though! My code is simple:
use Net::Stripe; my $stripe = Net::Stripe->new( api_key => $CFG->{stripe_mode} eq "test" ? $CFG->{stripe_secre +t_test} : $CFG->{stripe_secret_live}, debug => '1', debug_network => '1' ); my $cards = $stripe->get_cards(customer => 'cus_ALXYaoa9Lpo4Gs', +limit => 10);
..and then when running, it gives:
Odd number of elements in anonymous hash at test.cgi line 35.
Using: perl -w -d test.cgi , I am trying to debug it - but when I get to the point it gives that error, I don't see anything helpful. The only part I see is line 541 in /Net/Stripe.pm, which is:
method get_cards(Net::Stripe::Customer|Str $customer, HashRef :$created?, Str :$ending_before?, Int :$limit?, Str :$starting_after?) {
It seems to fatal after that (I added some test code in after, but it doesn't get that far). I'm looked around at the error message on Google, but I can't work out how to debug this further (I'm not a user of Moose myself, so wouldn't have a clue of the above code even looks correct!)
Any suggestions are much appreciated.
Cheers
Andy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Stripe, Moose bug?
by choroba (Cardinal) on Apr 12, 2017 at 13:47 UTC | |
by ultranerds (Hermit) on Apr 12, 2017 at 13:55 UTC | |
|
Re: Net::Stripe, Moose bug?
by Corion (Patriarch) on Apr 12, 2017 at 13:45 UTC | |
by ultranerds (Hermit) on Apr 12, 2017 at 13:51 UTC | |
|
Re: Net::Stripe, Moose bug?
by huck (Prior) on Apr 12, 2017 at 13:49 UTC | |
by ultranerds (Hermit) on Apr 12, 2017 at 13:57 UTC |