Skip Menu |
 

This queue is for tickets about the MojoX-JSON-RPC CPAN distribution.

Report information
The Basics
Id: 121395
Status: open
Priority: 0/
Queue: MojoX-JSON-RPC

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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

Attachments
MojoX-JSON-RPC-0.10-Use-modern-replacement-for-Mojo-Message-Response-is_.patch



Subject: Can't locate object method "is_status_class" via package "Mojo::Message::Response"
Download (untitled) / with headers
text/plain 976b
Mojolicious 7.31 removed a number of functions and methods, see https://metacpan.org/source/SRI/Mojolicious-7.31/Changes#L3 Test suite currently fails: ... Can't locate object method "is_status_class" via package "Mojo::Message::Response" at t/../lib/MojoX/JSON/RPC/Client.pm line 111. # Looks like your test exited with 255 just after 2. t/basic.t ...... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 34/36 subtests Can't locate object method "is_status_class" via package "Mojo::Message::Response" at t/../lib/MojoX/JSON/RPC/Client.pm line 111. # Looks like your test exited with 255 just after 1. t/exception.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/3 subtests Can't locate object method "is_status_class" via package "Mojo::Message::Response" at t/../lib/MojoX/JSON/RPC/Client.pm line 111. # Looks like your test exited with 255 just after 1. t/lite_app.t ... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests ...
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 227b
Dne St 26.dub.2017 03:23:54, SREZIC napsal(a): Show quoted text
> Mojolicious 7.31 removed a number of functions and methods, see > https://metacpan.org/source/SRI/Mojolicious-7.31/Changes#L3 > > Test suite currently fails:
A fix is attached.
Subject: MojoX-JSON-RPC-0.10-Use-modern-replacement-for-Mojo-Message-Response-is_.patch
From b585f7c15b024bda49037e3a09e9a96f770eb151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Fri, 5 May 2017 14:54:06 +0200 Subject: [PATCH] Use modern replacement for Mojo::Message::Response::is_success() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mojilicious 7.13 deprecated Mojo::Message::Response::is_success() and 7.31 removed it. Thus tests fail now. This patch replaces the is_success() calls with their modern replacements. CPAN RT#121395 Signed-off-by: Petr Písař <ppisar@redhat.com> --- Makefile.PL | 2 +- lib/MojoX/JSON/RPC/Client.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 4adb6ac..4d6a7bc 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,7 +12,7 @@ WriteMakefile( VERSION_FROM => 'lib/MojoX/JSON/RPC.pm', ABSTRACT => 'Perl implementation of JSON-RPC 2.0 protocol for Mojolicious', AUTHOR => 'Henry Tang <henryykt@gmail.com>', - PREREQ_PM => { 'Mojolicious' => '5.77' }, + PREREQ_PM => { 'Mojolicious' => '7.13' }, LICENSE => 'artistic_2', test => { TESTS => 't/*.t t/*/*.t t/*/*/*.t' }, META_MERGE => { diff --git a/lib/MojoX/JSON/RPC/Client.pm b/lib/MojoX/JSON/RPC/Client.pm index ef47b2b..f8fbbff 100644 --- a/lib/MojoX/JSON/RPC/Client.pm +++ b/lib/MojoX/JSON/RPC/Client.pm @@ -108,7 +108,7 @@ sub _process_result { } # Check if RPC call is succesfull - if ( !( $tx_res->is_status_class(200) || $tx_res->is_status_class(400) ) ) + if ( !( $tx_res->is_success || $tx_res->is_client_error ) ) { return; } -- 2.9.3


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.