Package: libunicode-linebreak-perl
Version: 0.0.20160301-1
Control: found -1 0.0.20140601-2
X-Debbugs-Cc: [email protected]
It looks like Unicode::GCString->new() doesn't handle get magic
properly. Consider:
% perl -MUnicode::GCString -le 'print Unicode::GCString->new($$) ? "ok" : "not
ok"'
Can't bless non-reference value at
/usr/lib/x86_64-linux-gnu/perl5/5.22/Unicode/GCString.pm line 52.
Forcing magic evaluation before calling new() makes it go away:
% perl -MUnicode::GCString -le 'print Unicode::GCString->new($$."") ? "ok" :
"not ok"'
ok
This seems to be the root cause for #826667 (biber: breaks with perl
5.20.2-3+deb8u5), where the biber test suite in jessie started to fail
when we backported Perl 5.20.3 patches to jessie and apparently slightly
changed magic handling for $1 et al.
I've distilled the biber failure to the attached (still weirdish)
test case, which fails on sid (Perl 5.22) and updated jessie (perl
5.20.2-3+deb8u5) but not before the updates (perl 5.20.2-3+deb8u4).
I think the way to go for jessie is to change biber (see
#826714: jessie-pu: package biber/1.9-3+deb8u1) to not pass $1 to
Unicode::GCString->new(), but IMO the magic handling in Unicode::GCString
should be fixed at least for sid/stretch.
Sorry for not including a patch; I can take a shot at that later if
you like.
--
Niko Tyni [email protected]
#!/usr/bin/perl
use Unicode::GCString;
$SIG{__WARN__} = sub {
print STDERR @_;
};
warn 'needs to warn first to reproduce?';
print _doit() ? "ok\n" : "not ok\n";
sub _doit {
"foo" =~ /(.+)/;
''.$1 if shift @ARGV; # this makes it go away
return Unicode::GCString->new($1);
}