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

[perl #118279] FAIL_OK is not defined in utf8

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
June 3, 2013 13:25
Subject:
[perl #118279] FAIL_OK is not defined in utf8
Message ID:
rt-3.6.HEAD-2552-1370265934-917.118279-15-0@perl.org
On Mon Jun 03 04:41:33 2013, vsespb wrote:
> Yes, you're right, I missed that. Sorry.
> 
> Some more readable examples (IMHO)
> 
> 1. JSON::XS - $enable
> 
> $json = $json->convert_blessed ([$enable])
> $enabled = $json->get_convert_blessed
> 
>     If $enable is true (or missing)
> 
> 
> (although true (or missing) is a bit confusing, but we'll have default
> false, so no problem)
> 
> 2. Your "map" example. BLOCK LIST and EXPR are look more like
> placeholders, than FAIL_OK.
> 
> So I propose use EXPR here
> 
> $success    = utf8::downgrade($string[, EXPR]);
> On failure dies or, if the value of EXPR is true, returns false.

It might be a break with tradition, but I think $fail_ok would be even
clearer.
-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118279

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About