in reply to Re^3: Why reftype and blessed are making my life harder than it needs to be
in thread Why reftype and blessed are making my life harder than it needs to be

It's easy to bless into "": bless(..., "\0")
This seems pathological. All you end up with is a ref that is blessed, but can only execute methods in UNIVERSAL. What practical and legitimate purpose would this serve? And better yet, what functions/modules/applications/etc. does it break in the process? For example, if you use Data::Dumper on such an object, and then eval that string, you won't get the same results (because the eval will create an object in package 'main').

Just because you can do something, doesn't mean you should.
  • Comment on Re^4: Why reftype and blessed are making my life harder than it needs to be

Replies are listed 'Best First'.
Re^5: Why reftype and blessed are making my life harder than it needs to be
by diotalevi (Canon) on Feb 10, 2006 at 21:15 UTC

    It breaks nothing, it's just a string. I think, maybe, the only time you'd ever bless into "" is when you wanted to have an object pretend it wasn't an object in the eyes of something else. Most anything else that uses ref() isn't going to be able to tell that this is an object.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊