I've released a new version of Business::Stripe::Webhook with a modified constructor following the discussion about STDIN typeglob

At the same time I have added some extra, more thorough tests. All the tests pass as expected here locally but now it has reached CPAN Testers, I have a failure. I can usually work out why something is failing from the diagnostic information...but I cannot see the problem in this case. Can you help please?

This is the CPAN Tester Report and this is the test file:

#!perl use 5.010; use strict; use warnings; use Test::More; use Business::Stripe::Webhook; #plan tests => 3; my $count = 0; print "\n"; my $payload; read(DATA, $payload, 10000); my $webhook_fail = Business::Stripe::Webhook->new( signing_secret => 'whsec_...', 'payload' => $payload, 'invoice-paid' => \&pay_invoice, ); $webhook_fail->process(); ok( !$webhook_fail->success, "Signature error" ); my $signing_secret = 'whsec_12345ABCDEFGHIJKLM'; $ENV{'HTTP_STRIPE_SIGNATURE'} = 't=ABCDEFGHIJ,v1=917fd62f6828ceb0509ae +bd9ee94e4c455887b6c174ef94037e089265c8c575c'; my $webhook_pass = Business::Stripe::Webhook->new( signing_secret => $signing_secret, 'payload' => $payload, 'invoice-paid' => \&pay_invoice, ); $webhook_pass->process(); ok( $webhook_pass->success, "Signature pass" ); sub pay_invoice { is( $_[0]->{'object'}, 'event', "pay.invoice handled - " . ++$coun +t ); } done_testing($count + 2); __DATA__ { "id": "evt_1NFK32EfkkexSbWLZb6LoEap", "object": "event", "api_version": "2020-08-27", "data": { ... bigger JSON object ... } }
Any help (or general help with improving tests) would be very welcome...

edited - to correct typo in module link


In reply to Test failing during CPAN Testing by Bod

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.