Bug 175877 - www/calamaris warns about deprecated construction in the code
Summary: www/calamaris warns about deprecated construction in the code
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Sivachenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-06 08:20 UTC by Alexey Markov
Modified: 2013-03-11 13:00 UTC (History)
0 users

See Also:


Attachments
file.diff (331 bytes, patch)
2013-02-06 08:20 UTC, Alexey Markov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Markov 2013-02-06 08:20:03 UTC
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.

Fix: Apply the attached patch.

Patch attached with submission follows:
How-To-Repeat: Install Calamaris and Perl 5.12 (or more recent) and run calamaris.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-02-06 08:20:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->demon

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-03-11 12:56:18 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"
Comment 3 Dmitry Sivachenko freebsd_committer freebsd_triage 2013-03-11 12:56:25 UTC
State Changed
From-To: open->closed

Patch committed, thanks!