in reply to Maintaining state in modules
I second perrin's suggestion above regarding using flat files if the data is small enough.
Another option to consider is to let the caller hand you an open file handle (or an IO::File object). That gives the caller full control over where to put the data, so your modules becomes portable to platforms you don't know about yet. Furthermore, it would allow passing in a tie'd filehandle to play games you haven't thought of.
|
---|