develooper Front page | perl.perl5.porters | Postings from June 2013

Re: [perl #118279] FAIL_OK is not defined in utf8

Thread Previous | Thread Next
Dave Mitchell
June 3, 2013 10:35
Re: [perl #118279] FAIL_OK is not defined in utf8
Message ID:
On Mon, Jun 03, 2013 at 02:38:02AM -0700, Victor Efimov wrote:
> FAIL_OK is not defined in utf8 module, however it's mentioned in
> documentation
> $ perl
> Bareword "FAIL_OK" not allowed while "strict subs" in use at line 5.
> Execution of aborted due to compilation errors.
> $ cat
> use strict;
> use warnings;
> use utf8;
> my $string='123';
> utf8::downgrade($string, FAIL_OK);
> it does not work as utf8::FAIL_OK too
> tested under perl 5.10 and 5.18

FAIL_OK is not a literal constant; its just a placeholder in the
documentation, which later on says "if the value of C<FAIL_OK> is

It's similar to where the docs for map say

    =item map BLOCK LIST

where you're not expected to pass the literal string 'BLOCK' as an arg.

Perhaps the docs could be improved by putting FAIL_OK in italics or

O Unicef Clearasil!
Gibberish and Drivel!
    -- "Bored of the Rings"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About