2008/5/21 Glenn Linderman <perl@nevcal.com>: > On approximately 5/21/2008 1:29 AM, came the following characters from the > keyboard of Rafael Garcia-Suarez: > >> Some way to mark PVs as "binary" and not upgradeable to SvUTF8 would be >> handy, though. > > > What's the goal? > > If, during the lifetime of a binary string, data gets attached to it that > makes it get upgraded, and later that data is detached, and the storage > format is truly transparent, then when the string is used in a context that > needs bytes, it should be handled properly (if not, let's fix that bug), > either by downgrading, or by accessing the data and validating that the > values are each < 256 (which downgrading does as a side effect). So how would that work exactly? Seriously. Give a general framework about how it would work. Consider that if it makes things massively slower that its probably not going to fly. > > If the goal is to prevent the cost of upgrading and downgrading, well, just > fix the bug that attached the upgraded data... and the cost of doing so also > vanishes. I dont think its so easy. The code responsible may be very hard to identify. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"