Hi,
As has been pointed out already, there is a difference between being able to stop someone from casually being able to see in a file and stopping someone with intent and ability.
To stop the former, my favorite technique is using Acme::Bleach (by our own TheDamian). It removes all printable ascii and when it's done only white-space characters remain. It performs the "encryption" the first time it runs, the next time will actually run the file.
Filter::Decrypt runs in much the same way. Make sure to check out the warnings in the documentation, though. It gives a good explanation about why this isn't real security.
I'm not sure how storable fits in to all this. I imagine something like the following:
#! /usr/bin/perl -w
use strict;
use Acme::Bleach;
@main::data = <DATA>
__DATA__
#Contents of storable output
#go in this section.
Then from a program that requires this code (and defines @main::data), this snippet could populate that array with the data for storable to work on. That may mean when storable generates its data you could just prepend it with those five lines, save it to disk, execute it once (since the first time it just performs the "bleaching") and be done with it.
That's untested and probably won't work as written (I haven't had a chance to play with storable yet). But I hope it will give you some ideas.
Update: ++Tachyon - like I said, this technique is only enough to stop the most easily discouraged folks from getting your data.
Good luck,
{NULE}
--
http://www.nule.org |