Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

does Encode::FB_WARN() / Encode::WARN_ON_ERR() / Encode::FB_QUIET() die for you?
#!/usr/bin/perl -l -- use Encode ; print $Encode::VERSION; decode(q/UTF16-LE/, $f=qq/\xff\xff/, Encode::FB_QUIET() ); print 'bye'; __END__ 2.51 UTF-16LE:Unicode character ffff is illegal at .../site/lib/Encode.pm l +ine 176.

I kinda thought it would warn and not die :/

  • Comment on does Encode::FB_WARN() / Encode::WARN_ON_ERR() / Encode::FB_QUIET() die for you?
  • Download Code

Replies are listed 'Best First'.
Re: does Encode::FB_WARN() / Encode::WARN_ON_ERR() / Encode::FB_QUIET() die for you?
by Athanasius (Archbishop) on May 13, 2013 at 13:35 UTC

    Yes, Encode::FB_WARN, Encode::WARN_ON_ERR, and Encode::FB_QUIET all produce fatal errors for me. But FB_DEFAULT does not:

    23:20 >perl -MEncode -le "print $Encode::VERSION; decode( q/UTF16-LE/, + $f = qq/\xff\xff/, Encode::FB_DEFAULT() ); print 'bye';" 2.47 bye 23:23 >

    :-O

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,