On 12 February 2014 20:59, Jeff King <p...@peff.net> wrote:
> +sub decode {
> +       my $orig = shift;
> +       my $decoded = eval { decode_utf8($orig, Encode::FB_CROAK) };
> +       return defined $decoded ?

I'd still advocate checking $@ here, rather than the defined $decoded check.

> +              ($decoded, sub { encode_utf8(shift) }) :
> +              ($orig, sub { shift });
> +}
> +

-- Thomas Adam
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to