diotalevi has asked for the wisdom of the Perl Monks concerning the following question:
Is there anything in the current perl implementation ("\5\6\0" lt $^V gt "\5\x8\0") that would fail on arbitary strings being used as the second argument to bless? For example - am I heading toward segmentation faults and the like by using (to pick a particularly contrived example) bless \$foo, join '', map chr(), 0 .. 0xff? It's a longish string with non-printables. Heck, even control characters and NUL. So does this break anything? Does it behave The Right Way with AUTOLOAD and UNIVERSAL in all cases?
I had to do something with VB recently where hashes (but we already knew VB is an unnatural language) had "names" and it just struck me that it's conceptually similar to the package slot stuck onto blessed things.
Of course anyone actually using this would need to be shot but it's interesting anyway.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Blessing into bitstrings
by derby (Abbot) on Jan 10, 2003 at 18:25 UTC |