in reply to making perl more forgetting

Any chance you could use the Cache modules (maybe Cache::Memory)?

"The Cache modules are designed to assist a developer in persisting data for a specified period of time."

Sounds like the idea you had for tieing variables...

Replies are listed 'Best First'.
Re: Re: making perl more forgetting
by dragonchild (Archbishop) on May 17, 2004 at 12:32 UTC
    The issue isn't keeping the data - it's the exact opposite. The problem is that data you have used, then released, isn't wiped. Here's an example:

    You have a file on your hard-drive. You "delete" the file. All that has happened is that the operating system has marked that area of the disk as writeable. The actual 1's and 0's are still in the same order they were before. (This is how disk recovery tools work.)

    The same principle works with memory. Just because you have released the memory back to the OS doesn't mean that the OS has changed what was in that area. The 1's and 0's are still in the same order. Now, let's say I have a program that runs after yours. If I'm careful (and lucky), I can grab the same memory locations that you had. If I don't overwrite them, I can read the data you had tried to keep secret.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested