Bug 190531 - misc/p5-I18N-LangTags - uses deprecated syntax
Summary: misc/p5-I18N-LangTags - uses deprecated syntax
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 19:30 UTC by vess
Modified: 2016-11-25 14:25 UTC (History)
1 user (show)

See Also:
amdmi3: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vess 2014-06-02 19:30:30 UTC
defined(%hash) is deprecated at /usr/local/lib/perl5/site_perl/5.18/I18N/LangTags/Detect.pm line 140.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at /usr/local/lib/perl5/site_perl/5.18/I18N/LangTags/Detect.pm line 140.
        (Maybe you should just omit the defined()?)

How-To-Repeat:
# perl -e'use I18N::LangTags::Detect'

Fix:
attached patch-Detect.pm

Patch attached with submission follows:

--- lib/I18N/LangTags/Detect.pm.orig	2004-06-21 08:47:55.000000000 +0300
+++ lib/I18N/LangTags/Detect.pm	2014-06-02 22:12:30.000000000 +0300
@@ -137,7 +137,7 @@
   my $module = $_[0];   # ASSUME sane module name!
   { no strict 'refs';
     return($tried{$module} = 1)
-     if defined(%{$module . "::Lexicon"}) or defined(@{$module . "::ISA"});
+     if %{ $module . "::Lexicon"} or @{$module . "::ISA"};
     # weird case: we never use'd it, but there it is!
   }
Comment 1 Dmitry Sivachenko freebsd_committer freebsd_triage 2014-06-04 12:33:22 UTC
Hello,
this seems not a FreeBSD-specific problem.

Did you submit your change to module's author?
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2016-09-09 11:52:12 UTC
The module is broken with perl 5.24.

% perl -e'use I18N::LangTags::Detect'         

Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /usr/local/lib/perl5/site_perl/I18N/LangTags/Detect.pm line 140.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Should be either fixed or marked as such.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-11-24 09:57:49 UTC
A commit references this bug:

Author: amdmi3
Date: Thu Nov 24 09:57:15 UTC 2016
New revision: 426998
URL: https://svnweb.freebsd.org/changeset/ports/426998

Log:
  - Fix perl syntax with perl 5.24+
  - While here, fix typo in documentation

  PR:		190531
  Submitted by:	vess@slavof.net
  Approved by:	maintainer timeout (daemon, 2.5 years)
  MFH:		2016Q4

Changes:
  head/misc/p5-I18N-LangTags/Makefile
  head/misc/p5-I18N-LangTags/files/
  head/misc/p5-I18N-LangTags/files/patch-lib_I18N_LangTags.pm
  head/misc/p5-I18N-LangTags/files/patch-lib_I18N_LangTags_Detect.pm
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2016-11-24 09:57:58 UTC
2 year maintainer timeout.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-11-25 14:24:51 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Nov 25 14:24:39 UTC 2016
New revision: 427114
URL: https://svnweb.freebsd.org/changeset/ports/427114

Log:
  MFH: r426998

  - Fix perl syntax with perl 5.24+
  - While here, fix typo in documentation

  PR:		190531
  Submitted by:	vess@slavof.net
  Approved by:	maintainer timeout (daemon, 2.5 years)
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/misc/p5-I18N-LangTags/Makefile
  branches/2016Q4/misc/p5-I18N-LangTags/files/