Skip Menu |

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 51484
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

Owner: Nobody in particular
Requestors: user42 [...]

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

Subject: dualvar() with utf8 string
Date: Fri, 13 Nov 2009 10:13:52 +1100
To: bug-Scalar-List-Utils [...]
From: Kevin Ryde <user42 [...]>
Download (untitled) / with headers
text/plain 221b
With recent debian i386 perl 5.10.1 and its supplied Scalar::Util 1.21, the program below prints str is utf8 dual not utf8 where I hoped the utf8-ness of the given $str might propagate to the dualvar() result.
text/x-perl 355b
use strict; use warnings; use Scalar::Util; print "Scalar::Util $Scalar::Util::VERSION\n"; my $num = 123; my $str = "\x{262E}"; print utf8::is_utf8($str) ? "str is utf8\n" : "str not utf8\n"; my $dual = Scalar::Util::dualvar ($num, $str); print "dual n=",$dual+0," s=$dual\n"; print utf8::is_utf8($dual) ? "dual is utf8\n" : "dual not utf8\n"; exit 0;
Fixed in 1.22 just released to CPAN

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to