Skip Menu |

This queue is for tickets about the Encode-IMAPUTF7 CPAN distribution.

Report information
The Basics
Id: 36180
Status: resolved
Priority: 0/
Queue: Encode-IMAPUTF7

People
Owner: Nobody in particular
Requestors: cpan [...] robm.fastmail.fm
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.00
Fixed in: (no value)



Subject: Two warnings
When running perl with warnings enabled, Encode::IMAPUTF7 generates at least two. # perl -w -e 'use Encode; use Encode::IMAPUTF7 (); $a="T&AOY-nketank\n"; Encode::from_to($a, "IMAP-UTF-7", "utf-8"); print $a;' Prototype mismatch: sub Encode::IMAPUTF7::decode ($$;$) vs none at /usr/share/perl5/Encode/IMAPUTF7.pm line 76. Use of uninitialized value in numeric lt (<) at /usr/share/perl5/Encode/IMAPUTF7.pm line 56. Tænketank # Annoying.
Fixed by the attached patch
diff -Naur Encode-IMAPUTF7-1.00.patched/lib/Encode/IMAPUTF7.pm Encode-IMAPUTF7-1.00/lib/Encode/IMAPUTF7.pm --- Encode-IMAPUTF7-1.00.patched/lib/Encode/IMAPUTF7.pm 2009-02-13 09:56:16.000000000 +0100 +++ Encode-IMAPUTF7-1.00/lib/Encode/IMAPUTF7.pm 2005-09-28 16:06:32.000000000 +0200 @@ -49,11 +49,10 @@ return $bytes; } -sub decode($$;$){ +sub decode{ my ($obj, $bytes, $chk) = @_; my $len = length($bytes); my $str = ""; - pos($bytes) = 0; while (pos($bytes) < $len) { if ($bytes =~ /\G([^&]+)/ogc) { $str .= $1;
This issues should be fixed in Encode::IMPAUTF7-1.01 just uploaded to CPAN