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


In reply to Net::Stripe, Moose bug? by ultranerds

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.