Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://529593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found