Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Encode::FB_CROAK eating up strings?

by Anonymous Monk
on Apr 11, 2016 at 11:22 UTC ( [id://1160103]=note: print w/replies, xml ) Need Help??


in reply to Encode::FB_CROAK eating up strings?

Encode::FB_CROAK | Encode::LEAVE_SRC is the incantation you want.
I tried to look in the docs for Encode but to no avail
Yes, it's easy to miss, but it's documented: 'If the "Encode::LEAVE_SRC" bit is not set but CHECK is set, then the source string to encode() or decode() will be overwritten in place. If you're not interested in this, then bitwise-OR it with the bitmask.'

Replies are listed 'Best First'.
Re^2: Encode::FB_CROAK eating up strings?
by polettix (Vicar) on Apr 11, 2016 at 12:14 UTC
    Thanks for pointing out.

    I personally think that the docs might use some clarifications directly in encode and decode to change people's expectations. I'll try to propose a doc patch where this possibility is mentioned explicitly.

    Update: just sent a Pull Request at https://github.com/dankogai/p5-encode/pull/54.

    Update: merged, yay!

    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Io ho capito... ma tu che hai detto?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1160103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found