Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: utf8::upgrade and $1

by ikegami (Pope)
on Aug 31, 2009 at 18:06 UTC ( #792422=note: print w/ replies, xml ) Need Help??


in reply to Re^2: utf8::upgrade and $1
in thread utf8::upgrade and $1

I think we can confirm that the fact that $1 leaves this function with the SVf_POK flag on is a bug.

Yes.

demerphq had this to say with regards to why $1 doesn't carry the READONLY flag:

Not a problem for my solution. The setter called via mg_set after the upgrade will throw an error if appropriate.

Turns out that this is deliberate, as some pluggable regex engines allow for a writable $1.

That means that upgrading $1 might have no effect or might upgrade the entire source string in those engines, but I don't see that as a problem. Side-effects are expectedintended when playing with magical variables.

Incidentally, this bug is a regession in Perl 5.10. Perl 5.8.8 doesn't have this problem.

That would explain the presence of sv_utf8_upgrade_nomg.


Comment on Re^3: utf8::upgrade and $1
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2015-07-01 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls