-BEGIN {
- # Standard Perl module stuff
- use Exporter();
- our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
- $VERSION = 1.00;
- @ISA = qw(Exporter);
- @EXPORT = qw(&SetOptions);
- %EXPORT_TAGS = ();
- @EXPORT_OK = qw(%CF);
+### Class methods ###
+
+sub new($) {
+ my ($class) = @_;
+ my $self = { };
+ $self->{cfg} = {
+ # Directories
+ OrigDir => '.', # Original images
+ PhotoDir => 'photo', # Scaled-down photos for web
+ CacheDir => 'cache', # Cache with meta-data and thumbnails
+
+ # URL prefixes
+ PhotoUrlPrefix => 'photo/',
+ ThumbUrlPrefix => 'thumb/',
+ ThemeUrlPrefix => 'gal/',
+
+ # Processing machinery settings
+ ScanDefaultTransform => 's',
+ PhotoMaxWidth => 1024,
+ PhotoMaxHeight => 1024,
+ ThumbFormats => {}, # Set up by themes
+
+ # Titles and navigation
+ Title => 'An Unnamed Gallery',
+ SubTitle => "",
+ ParentURL => '../',
+ BackURL => "",
+ FwdURL => "",
+ };
+ return bless $self, $class;