From nobody@FreeBSD.org  Wed Feb  6 08:14:24 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 3C151D6B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Feb 2013 08:14:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1BCD96E8
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Feb 2013 08:14:24 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r168ENcZ079659
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Feb 2013 08:14:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r168EN3A079658;
	Wed, 6 Feb 2013 08:14:23 GMT
	(envelope-from nobody)
Message-Id: <201302060814.r168EN3A079658@red.freebsd.org>
Date: Wed, 6 Feb 2013 08:14:23 GMT
From: Alexey Markov <redrat@mail.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: www/calamaris warns about deprecated construction in the code
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         175877
>Category:       ports
>Synopsis:       www/calamaris warns about deprecated construction in the code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    demon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 06 08:20:03 UTC 2013
>Closed-Date:    Mon Mar 11 12:56:41 UTC 2013
>Last-Modified:  Mon Mar 11 13:00:00 UTC 2013
>Originator:     Alexey Markov
>Release:        8.3-RELEASE-p3
>Organization:
JSC Complitex
>Environment:
FreeBSD meson.complitex.ru 8.3-RELEASE-p5 FreeBSD 8.3-RELEASE-p5 #0: Fri Nov 23
12:41:36 MSK 2012 redrat@meson.complitex.ru:/arc/obj/arc/src/sys/MESON amd64
>Description:
After upgrading Perl from 5.10 to 5.12 I have warnings on every run of calamaris:

defined(%hash) is deprecated at /usr/local/bin/calamaris line 2609.
 (Maybe you should just omit the defined()?)

It's pretty annoying if calamaris runs from cron job.

After some research and googling I have find out that since Perl 5.12 'defined' must not be applied to the hashes and arrays.
>How-To-Repeat:
Install Calamaris and Perl 5.12 (or more recent) and run calamaris.
>Fix:
Apply the attached patch.

Patch attached with submission follows:

--- calamaris.orig	2013-02-05 11:25:07.000000000 +0400
+++ calamaris	2013-02-06 11:52:16.000000000 +0400
@@ -2606,7 +2606,7 @@
 	    100, 100 * $tcp_hit / $tcp );
   }
   outstop(10);
-  if ( defined(%tcp_content) ) {
+  if ( %tcp_content ) {
     outstart(11);
     if ( $tcp == 0 ) {
       outline( 11, 'no matching requests' );


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->demon 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Feb 6 08:20:17 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175877 
State-Changed-From-To: open->closed 
State-Changed-By: demon 
State-Changed-When: Mon Mar 11 12:56:25 UTC 2013 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175877 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/175877: commit references a PR
Date: Mon, 11 Mar 2013 12:56:18 +0000 (UTC)

 Author: demon
 Date: Mon Mar 11 12:56:11 2013
 New Revision: 313883
 URL: http://svnweb.freebsd.org/changeset/ports/313883
 
 Log:
   Fix warning produced by modern version of perl.
   
   PR:		175877
   Submitted by:	Alexey Markov <redrat@mail.ru>
 
 Added:
   head/www/calamaris/files/
   head/www/calamaris/files/patch-calamaris   (contents, props changed)
 Modified:
   head/www/calamaris/Makefile   (contents, props changed)
 
 Modified: head/www/calamaris/Makefile
 ==============================================================================
 --- head/www/calamaris/Makefile	Mon Mar 11 12:53:40 2013	(r313882)
 +++ head/www/calamaris/Makefile	Mon Mar 11 12:56:11 2013	(r313883)
 @@ -7,6 +7,7 @@
  
  PORTNAME=	calamaris
  PORTVERSION=	2.59
 +PORTREVISION=	1
  CATEGORIES=	www textproc
  MASTER_SITES=	http://cord.de/tools/squid/calamaris/
  
 
 Added: head/www/calamaris/files/patch-calamaris
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/www/calamaris/files/patch-calamaris	Mon Mar 11 12:56:11 2013	(r313883)
 @@ -0,0 +1,11 @@
 +--- calamaris.orig	2013-03-11 16:52:12.000000000 +0400
 ++++ calamaris	2013-03-11 16:52:45.000000000 +0400
 +@@ -2606,7 +2606,7 @@
 + 	    100, 100 * $tcp_hit / $tcp );
 +   }
 +   outstop(10);
 +-  if ( defined(%tcp_content) ) {
 ++  if ( %tcp_content ) {
 +     outstart(11);
 +     if ( $tcp == 0 ) {
 +       outline( 11, 'no matching requests' );
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
