develooper Front page | perl.perl5.porters | Postings from April 2018

Re: [perl #131594] Bleadperl v5.27.0-141-g5d09ee1cb7 breaksDAVIDO/JSON-Tiny-0.56.tar.gz

Thread Previous | Thread Next
Dave Mitchell
April 19, 2018 20:51
Re: [perl #131594] Bleadperl v5.27.0-141-g5d09ee1cb7 breaksDAVIDO/JSON-Tiny-0.56.tar.gz
Message ID:

On Tue, Dec 05, 2017 at 04:25:04PM +0000, Zefram wrote:
> Sawyer X wrote:
> >Sorry. I meant SvPOK.
> Are you referring to the use of bitwise ops to determine SvNIOK()?
> Like this:
> $ perl -le 'sub st { my($v) = @_; print +($v & "") eq "" ? "string" : "number"; } st(3); $p = "3"; st($p); $p+0; st($p); st("\x{100}")'
> number
> string
> number
> string
> In this form it still works on blead.  The bitwise operators complain
> if they have to non-trivially operate on an above-Latin-1 character,
> but if the corresponding position in the other string is off the end of
> the string then that's apparently fine.

this ticket is currently marked as a 5.28 blocker. The only reason for
that was your suggestion that ~~ still had a valid use for large-ord
strings, but in the dialogue above you weren't very clear.

Can you confirm (with a clear example), or deny, whether the old behaviour
of bitwise operators (not to die on ord > 0xff) is still needed?

This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

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