It is interesting to note that a Devel::Peek::Dump done in 5.16 also shows UTF8, but 5.16 does not have the problem that 5.18 does.
C:\Users\gweekly>c:\ActivePerl5.16.3\bin\perl -d i:\bin\badperl
Loading DB routines from perl5db.pl version 1.37
Editor support available.
Enter h or 'h h' for help, or 'perldoc perldebug' for more help.
main::(i:\bin\badperl:16): if grep { /^ SAM $ /xmsi} keys %ENV;
DB<1> c 27
main::(i:\bin\badperl:27): my $fixed = substr "X$name", 1; # Should be the
same
DB<2> use Devel::Peek
DB<3> Dump $name
SV = PVNV(0x2cc711c) at 0x2a27314
REFCNT = 2
FLAGS = (PADMY,POK,pPOK,UTF8)
IV = 0
NV = 0
PV = 0x2d6614c "SAM"\0 UTF8 "SAM"
CUR = 3
LEN = 12
DB<4> q
C:\Users\gweekly>c:\ActivePerl5.18.1\bin\perl -d i:\bin\badperl
Loading DB routines from perl5db.pl version 1.39_10
Editor support available.
Enter h or 'h h' for help, or 'perldoc perldebug' for more help.
main::(i:\bin\badperl:16): if grep { /^ SAM $ /xmsi} keys %ENV;
DB<1> c 27
main::(i:\bin\badperl:27): my $fixed = substr "X$name", 1; # Should be the
same
DB<2> use Devel::Peek
DB<3> Dump $name
SV = PVMG(0x2f14534) at 0x2bfd924
REFCNT = 2
FLAGS = (PADMY,POK,pPOK,UTF8)
IV = 0
NV = 0
PV = 0x2f730d4 "SAM"\0 UTF8 "SAM"
CUR = 3
LEN = 12
DB<4>
| [reply] |
This is very helpful. Thank you!
Any idea if this has been (or should be) reported as a BUG? | [reply] |
Thank you.
That page indicates v5.16.0 took an approach (assumes byte strings) that seems to work for me.
My quandary is wondering why 5.18 then stops working for me.
It SEEMS to me like a bug was introduced in 5.18.
Could anyone look into this possibility (using my code as the test case)?
Thanks!
| [reply] |