Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 08:14:23 GMT
From:      Alexey Markov <redrat@mail.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/175877: www/calamaris warns about deprecated construction in the code
Message-ID:  <201302060814.r168EN3A079658@red.freebsd.org>
Resent-Message-ID: <201302060820.r168K4Q0073495@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         175877
>Category:       ports
>Synopsis:       www/calamaris warns about deprecated construction in the code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 06 08:20:03 UTC 2013
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302060814.r168EN3A079658>