Page Archive

PageArchive is a perl5 package that implements a set of methods for maintaining a versioned set of pages as files within a directory. It was created to replace a similar DBM tied-hash implementation used by WebWeb, and is particularly useful on machines which don't have a DBM which can handle entries more than 1K long. It uses a utility package, Storable (also documented here), to transform page objects into scalars suitable for storage and retrieval by PageArchive.

Source is available under an open source license from, along with WebWebTwo.


Global Variables Class Methods Instance Methods


A pretty good way to "flatten" most objects into scalars, for ultimate storage into a DBM-like database. The following objects may be flattened:

You can use it in a non-OO way...

# Flatten an object:
my $fluffy = ['nice', 'and', 'fluffy'];
my $flat = IU::Storable->flatten($fluffy);

# Inflate it again (note that we pass in a reference for efficiency): my $fluffy = IU::Storable->inflate(\$flat);
Or you can inherit from it...

package Stuff;
@ISA = qw(IU::Storable);
my $flat = $fluffy->flatten;
my $fluffy = Stuff->inflate(\$flat);
Public interface -- JoeMcMahon

Very useful stuff, thanks Joe. Check out CvWiki for a different approach to the same problem. -- PeterMerel

EditText of this page (last edited March 19, 2005) or FindPage with title or text search