in reply to Strange AUTOLOAD's bevavior with utf8 data

FWIW (I currently don't have 5.8.9 available), I've just tried it with 5.8.8 (x86_64-linux-gnu-thread-multi) and 5.10.0 (x86_64-linux) and

$body = "This \x{5555} is \x{6666} a \x{7777} test\n";

and it prints out fine (immediately).  Of course, that won't help much if it's a 5.8.9-specific issue...

Could you post a specific UTF-8 string that reproduces the problem in your case with the code as shown? (BTW, I had to put in a use Carp for the croak)

Replies are listed 'Best First'.
Re^2: Strange AUTOLOAD's bevavior with utf8 data
by ascray (Initiate) on Apr 29, 2009 at 13:01 UTC

    Thanks for your reply.

    I've looked at my code again before posting here full module source and found string in my AUTOLOAD sub that stoped my app:

    carp "value now is ".$value; # ..this message will not be printed if $value is utf8 string

    So I found the real error source: combination carp & use diagnostics

    Can you check following code in your environment?:

    #!/usr/bin/perl use strict; #use diagnostics; # when uncommented will freeze the app use Carp; print "before carp\n"; carp "\x{41f}\x{440}\x{438}\x{432}\x{435}\x{442}"; #'Hello' in Russian print "after carp\n";

    Is this a normal reaction on "use diagnostics"?

      I tried it on

      • Debian Linux 5.8.8
      • ActivePerl Windown 5.6.0
      • ActivePerl Windown 5.6.1
      • ActivePerl Windown 5.8.0
      • ActivePerl Windown 5.8.8
      • ActivePerl Windown 5.8.9
      • ActivePerl Windown 5.10.0

      With 5.8.8 and 5.8.9 in Windows, I get a 4 second "pause" where CPU activity reached 100%.

      It doesn't occur with warnings and without diagnostics (a debugging tool) and it doesn't happen in 5.10, so it's a non-issue.