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

That sounds like a bug to me. Internally, all Perl strings are zero terminated, but on the language level, Perl is supposed to be better than C, and be able to deal with "\0" correctly. Here it doesn't. It seems that bless [], "\0" and bless [], "\0foo" are blessed into the same package.
Perl --((8:>*

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 12, 2006 at 04:27 UTC

    Yes, I suppose so, but it's long standing and doesn't impede most people. Packages are the only null terminated string in perl. You might be able to get perl to leak memory if you blessed into things with lots of data after the null.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊