[xml/sgml-pkgs] Bug#458578: uses pseudo-hashes, fails with perl 5.10

Joey Hess joeyh at debian.org
Tue Jan 1 20:23:34 UTC 2008


Package: libxml-encoding-perl
Version: 1.01
Severity: important
Tags: patch

Perl 5.10 removes the deprecated pseudo-hashes, but this package still
uses them, in the compile_encoding program, line 38.

Symptom:

% compile_encoding /usr/share/libxml-encoding-perl/iso-8859-6.xml -o ./foo 
Not a HASH reference at /usr/bin/compile_encoding line 42.
zsh: exit 255   compile_encoding /usr/share/libxml-encoding-perl/iso-8859-6.xml -o./ foo

Fix:

--- /usr/bin/compile_encoding   2008-01-01 15:01:12.000000000 -0500
+++ ./compile_encoding  2008-01-01 15:18:35.000000000 -0500
@@ -33,9 +33,10 @@
 use fields qw(min max map explen);
 
 sub new {
-  my $class = shift;
-  no strict 'refs';
-  my $pfxmap = [\%{"${class}::FIELDS"}];
+  my Pfxmap $pfxmap = shift;
+  unless (ref $pfxmap) {
+         $pfxmap = fields::new($pfxmap);
+  }
 
   while (@_) {
     my $key = shift;

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20080101/d57c93ad/attachment.pgp 


More information about the debian-xml-sgml-pkgs mailing list