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

Report information
The Basics
Id:
94259
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
tomjudge [...] cisco.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)

Attachments
JSON-Schema-0.016-useless-use-in-void-context.patch patch-lib__JSON__Schema__Helper.pm



MIME-Version: 1.0
X-Ironport-Anti-Spam-Result: AkEFAD6TNFOtJXG+/2dsb2JhbABZgwY7V8N9FnSCLDpRAT5CJwSIDJ9msWQXkiWBFASYTYEzkQGDL4Ir
Content-ID: <97282F5DAA94FD46B7A2B06EF4F2C201@emea.cisco.com>
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -9.51
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DD6E324061E for <cpan-bug+JSON-Schema@hipster.bestpractical.com>; Thu, 27 Mar 2014 17:13:58 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nq7SKyJgXHhC for <cpan-bug+JSON-Schema@hipster.bestpractical.com>; Thu, 27 Mar 2014 17:13:57 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 98D0224056F for <bug-JSON-Schema@rt.cpan.org>; Thu, 27 Mar 2014 17:13:57 -0400 (EDT)
Received: (qmail 27999 invoked by alias); 27 Mar 2014 21:13:56 -0000
Received: from alln-iport-1.cisco.com (HELO alln-iport-1.cisco.com) (173.37.142.88) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 27 Mar 2014 14:13:50 -0700
Received: from rcdn-core2-3.cisco.com ([173.37.113.190]) by alln-iport-1.cisco.com with ESMTP; 27 Mar 2014 21:13:45 +0000
Received: from xhc-aln-x13.cisco.com (xhc-aln-x13.cisco.com [173.36.12.87]) by rcdn-core2-3.cisco.com (8.14.5/8.14.5) with ESMTP id s2RLDjFE017877 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for <bug-JSON-Schema@rt.cpan.org>; Thu, 27 Mar 2014 21:13:45 GMT
Received: from xmb-aln-x03.cisco.com ([169.254.6.56]) by xhc-aln-x13.cisco.com ([173.36.12.87]) with mapi id 14.03.0123.003; Thu, 27 Mar 2014 16:13:45 -0500
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@cisco.com
Delivered-To: cpan-bug+JSON-Schema@hipster.bestpractical.com
Subject: Useless use of concatenation (.) or string in void context
Thread-Index: AQHPSgFvKK478cKV3UmxYm19uWSqKg==
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2013; q=dns/txt; s=iport; t=1395954830; x=1397164430; h=from:to:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=4SMuSAAW2/UsdyAhMLcIhS6OSkZOy97f6xW8u4P7yEQ=; b=mkFLSTpMBDMRhx7ld+bFrQQj4u3M8PqOCHaBUpQJQb6n2rXp47nUrCLM 6EHXfxO3ddlWSUv5ozFZQjocRau7lh21iPf35WoBPWRRp9FQAjBfFgZ7A Fa+/fo7HVtZlNQH9lq6oYpSve89FTBH+905sEprxR2KSRsdfkX2DUqTuR 8=;
Date: Thu, 27 Mar 2014 21:13:45 +0000
X-Spam-Level:
To: "bug-JSON-Schema@rt.cpan.org" <bug-JSON-Schema@rt.cpan.org>
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-9.51 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
Content-Language: en-US
X-Ironport-Anti-Spam-Filtered: true
Message-ID: <69FFAB6E-8BE0-47A6-9882-C7C9489F9E58@cisco.com>
X-MS-Tnef-Correlator:
X-Ironport-Av: E=Sophos;i="4.97,744,1389744000"; d="scan'208";a="30957584"
Return-Path: <tomjudge@cisco.com>
X-Original-To: cpan-bug+JSON-Schema@hipster.bestpractical.com
X-RT-Mail-Extension: json-schema
Thread-Topic: Useless use of concatenation (.) or string in void context
X-MS-Has-Attach:
X-Originating-Ip: [10.117.129.5]
Accept-Language: en-US
From: "Tom Judge (tomjudge)" <tomjudge@cisco.com>
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 1942
Useless use of concatenation (.) or string in void context at /usr/local/lib/perl5/site_perl/5.16/JSON/Schema/Helper.pm line 311 (#1) (W void) You did something without a side effect in a context that does nothing with the return value, such as a statement that doesn't return a value from a block, or the left side of a scalar comma operator. Very often this points not to stupidity on your part, but a failure of Perl to parse your program the way you thought it would. For example, you'd get this if you mixed up your C precedence with Python precedence and said $one, $two = 1, 2; when you meant to say ($one, $two) = (1, 2); Another common error is to use ordinary parentheses to construct a list reference when you should be using square or curly brackets, for example, if you say $array = (1,2); when you should have said $array = [1,2]; The square brackets explicitly turn a list value into a scalar value, while parentheses do not. So when a parenthesized list is evaluated in a scalar context, the comma is treated like C's comma operator, which throws away the left argument, which is not what you want. See perlref for more on this. This warning will not be issued for numerical constants equal to 0 or 1 since they are often used in statements like 1 while sub_with_side_effects(); String constants that would normally evaluate to 0 or 1 are warned about. Useless use of concatenation (.) or string in void context at /usr/local/lib/perl5/site_perl/5.16/JSON/Schema/Helper.pm line 316 (#1) Useless use of concatenation (.) or string in void context at /usr/local/lib/perl5/site_perl/5.16/JSON/Schema/Helper.pm line 339 (#1) Useless use of concatenation (.) or string in void context at /usr/local/lib/perl5/site_perl/5.16/JSON/Schema/Helper.pm line 344 (#1)
MIME-Version: 1.0
In-Reply-To: <69FFAB6E-8BE0-47A6-9882-C7C9489F9E58@cisco.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <69FFAB6E-8BE0-47A6-9882-C7C9489F9E58@cisco.com>
Content-Type: multipart/mixed; boundary="----------=_1400702585-1003-4"
Message-ID: <rt-4.0.18-1003-1400702585-559.94259-0-0@rt.cpan.org>
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 35
Misplaced paren. Here's the patch.
MIME-Version: 1.0
Subject: patch-lib__JSON__Schema__Helper.pm
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: text/x-perl-script; name="patch-lib__JSON__Schema__Helper.pm"
Content-Disposition: inline; filename="patch-lib__JSON__Schema__Helper.pm"
Content-Transfer-Encoding: binary
Content-Length: 1479
--- ./lib/JSON/Schema/Helper.pm.orig 2014-05-21 15:43:01.000000000 -0400 +++ ./lib/JSON/Schema/Helper.pm 2014-05-21 15:49:17.000000000 -0400 @@ -308,12 +308,12 @@ if ((defined $schema->{'minimumCanEqual'} and not $schema->{'minimumCanEqual'}) or $schema->{'exclusiveMinimum'}) { - $addError->("must be greater than minimum value '" . $schema->{'minimum'}) . "'" + $addError->("must be greater than minimum value '" . $schema->{'minimum'} . "'") if $value lt $schema->{'minimum'}; } else { - $addError->("must be greater than or equal to minimum value '" . $schema->{'minimum'}) . "'" + $addError->("must be greater than or equal to minimum value '" . $schema->{'minimum'} . "'") if $value le $schema->{'minimum'}; } } @@ -336,12 +336,12 @@ if ((defined $schema->{'maximumCanEqual'} and not $schema->{'maximumCanEqual'}) or $schema->{'exclusiveMaximum'}) { - $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'}) . "'" + $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'} . "'") if $value gt $schema->{'maximum'}; } else { - $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'}) . "'" + $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'} . "'") if $value ge $schema->{'maximum'}; } }
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-1003-1400702585-559.94259-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <69FFAB6E-8BE0-47A6-9882-C7C9489F9E58@cisco.com> <rt-4.0.18-1003-1400702585-559.94259-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-29556-1402302973-1222.94259-0-0@rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 188
I can confirm that this patch fixes the problem and that JSON::Schema works with the fix in my Real World Use Case(tm) Hope the patched version will be on its way to CPAN soon :-) - Alex
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-29556-1402302973-1222.94259-0-0@rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <69FFAB6E-8BE0-47A6-9882-C7C9489F9E58@cisco.com> <rt-4.0.18-1003-1400702585-559.94259-0-0@rt.cpan.org> <rt-4.0.18-29556-1402302973-1222.94259-0-0@rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1433197345-18687-2"
Message-ID: <rt-4.0.18-18687-1433197345-1712.94259-0-0@rt.cpan.org>
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 495
Updated patch for 0.16. This bites me quite hard as some module I can not figure out which makes these warnings fatal :( I'm willing to co-maint this module (PAUSE account RUZ) on the terms you announced in another module. On Mon Jun 09 04:36:13 2014, KAORU wrote:
Show quoted text
> I can confirm that this patch fixes the problem and that JSON::Schema > works with the fix in my Real World Use Case(tm) > > Hope the patched version will be on its way to CPAN soon :-) > > - Alex
-- Best regards, Ruslan.
MIME-Version: 1.0
Subject: JSON-Schema-0.016-useless-use-in-void-context.patch
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: application/octet-stream; name="JSON-Schema-0.016-useless-use-in-void-context.patch"
Content-Disposition: inline; filename="JSON-Schema-0.016-useless-use-in-void-context.patch"
Content-Transfer-Encoding: base64
Content-Length: 1577
diff -ru JSON-Schema-0.016/lib/JSON/Schema/Helper.pm JSON-Schema-0.016-me/lib/JSON/Schema/Helper.pm --- JSON-Schema-0.016/lib/JSON/Schema/Helper.pm 2014-09-11 17:27:00.000000000 +0400 +++ JSON-Schema-0.016-me/lib/JSON/Schema/Helper.pm 2015-06-02 00:52:21.000000000 +0300 @@ -309,12 +309,12 @@ if ((defined $schema->{'minimumCanEqual'} and not $schema->{'minimumCanEqual'}) or $schema->{'exclusiveMinimum'}) { - $addError->("must be greater than minimum value '" . $schema->{'minimum'}) . "'" + $addError->("must be greater than minimum value '" . $schema->{'minimum'} . "'") if $value lt $schema->{'minimum'}; } else { - $addError->("must be greater than or equal to minimum value '" . $schema->{'minimum'}) . "'" + $addError->("must be greater than or equal to minimum value '" . $schema->{'minimum'} . "'") if $value le $schema->{'minimum'}; } } @@ -337,12 +337,12 @@ if ((defined $schema->{'maximumCanEqual'} and not $schema->{'maximumCanEqual'}) or $schema->{'exclusiveMaximum'}) { - $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'}) . "'" + $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'} . "'") if $value gt $schema->{'maximum'}; } else { - $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'}) . "'" + $addError->("must be less than or equal to maximum value '" . $schema->{'maximum'} . "'") if $value ge $schema->{'maximum'}; } }
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-4164-1610229142-189.94259-0-0@rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 80


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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