Skip Menu |

This queue is for tickets about the Font-TTF CPAN distribution.

Report information
The Basics
Id: 77846
Status: resolved
Priority: 0/
Queue: Font-TTF

People
Owner: Nobody in particular
Requestors: martink [...] bcgsc.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.48
Fixed in: 1.02



Subject: defined(@array) deprecated in perl 5.16.0
defined(@array) is deprecated at /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 146. (Maybe you should just omit the defined()?) defined(@array) is deprecated at /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 189. (Maybe you should just omit the defined()?) defined(@array) is deprecated at /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 295. (Maybe you should just omit the defined()?)
On Fri 15 Jun 2012 15:30:50, MARTINK wrote: Show quoted text
> defined(@array) is deprecated at > /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 146. > (Maybe you should just omit the defined()?) > defined(@array) is deprecated at > /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 189. > (Maybe you should just omit the defined()?) > defined(@array) is deprecated at > /c5/shared/perl/5.16.0/lib/site_perl/5.16.0/Font/TTF/Name.pm line 295. > (Maybe you should just omit the defined()?)
Here's a (trivial) patch that fixes the issue. -- Mike
Subject: RT77846.diff
Index: lib/Font/TTF/Name.pm =================================================================== --- lib/Font/TTF/Name.pm (revision 827) +++ lib/Font/TTF/Name.pm (working copy) @@ -143,7 +143,7 @@ { if ($pid == 1 && defined $apple_encodings[0][$eid]) { $dat = TTF_word_utf8(pack("n*", map({$apple_encodings[0][$eid][$_]} unpack("C*", $dat)))); } - elsif ($pid == 2 && $eid == 2 && defined @cp_1252) + elsif ($pid == 2 && $eid == 2 && @cp_1252) { $dat = TTF_word_utf8(pack("n*", map({$cp_1252[0][$_]} unpack("C*", $dat)))); } elsif ($pid == 0 || $pid == 3 || ($pid == 2 && $eid == 1)) { $dat = TTF_word_utf8($dat); } @@ -186,7 +186,7 @@ { $str_trans = pack("C*", map({$apple_encodings[1][$eid]{$_} || 0x3F} unpack("n*", TTF_utf8_word($str_trans)))); } - elsif ($pid == 2 && $eid == 2 && defined @cp_1252) + elsif ($pid == 2 && $eid == 2 && @cp_1252) { $str_trans = pack("C*", map({$cp_1252[1][$eid]{$_} || 0x3F} unpack("n*", TTF_utf8_word($str_trans)))); } @@ -293,7 +293,7 @@ { my ($self, $pid, $eid) = @_; - return ($utf8 && ($pid == 0 || $pid == 3 || ($pid == 2 && ($eid != 2 || defined @cp_1252)) + return ($utf8 && ($pid == 0 || $pid == 3 || ($pid == 2 && ($eid != 2 || @cp_1252)) || ($pid == 1 && defined $apple_encodings[$eid]))); }
This is fixed in (at least) 1.02. The RT ticket can be closed.
On Wed Oct 09 08:13:46 2013, MICHIELB wrote: Show quoted text
> This is fixed in (at least) 1.02. The RT ticket can be closed.