Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Why reftype and blessed are making my life harder than it needs to be

by Perl Mouse (Chaplain)
on Feb 11, 2006 at 19:53 UTC ( #529593=note: print w/replies, xml ) Need Help??


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.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2020-10-23 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (237 votes). Check out past polls.

    Notices?