rev 1788 - in trunk/siesta: . lib/Siesta

[prev] [thread] [next] [lurker] [Date index for 2005/01/26]

From: richardc
Subject: rev 1788 - in trunk/siesta: . lib/Siesta
Date: 23:40 on 26 Jan 2005
Author: richardc
Date: 2005-01-26 23:40:41 +0000 (Wed, 26 Jan 2005)
New Revision: 1788

Added:
   trunk/siesta/lib/Siesta/Config.pm
Removed:
   trunk/siesta/Config.pm.in
Modified:
   trunk/siesta/Build.PL
   trunk/siesta/lib/Siesta/
Log:
Config.pm is auto-generated no more

Modified: trunk/siesta/Build.PL
===================================================================
--- trunk/siesta/Build.PL	2005-01-26 22:18:05 UTC (rev 1787)
+++ trunk/siesta/Build.PL	2005-01-26 23:40:41 UTC (rev 1788)
@@ -61,18 +61,6 @@
 
 my $ROOT = $build->prompt("where do we install to guv?", $D_ROOT);
 
-print "Generating Siesta::Config from your answers\n";
-open(IN,  "<Config.pm.in")
-  or die "couldn't open Config.pm.in: $!";
-open(OUT, ">lib/Siesta/Config.pm")
-  or die "couldn't open Config.pm for write: $!";
-while (<IN>) {
-    s'@@ROOT@@'$ROOT'e;
-    print OUT $_;
-}
-close IN  or die "error closing Config.pm.in: $!";
-close OUT or die "error closing Config.pm: $!";
-
 $build->{config}{__extras_destination} = $ROOT;
 
 $build->create_build_script;

Deleted: trunk/siesta/Config.pm.in
===================================================================
--- trunk/siesta/Config.pm.in	2005-01-26 22:18:05 UTC (rev 1787)
+++ trunk/siesta/Config.pm.in	2005-01-26 23:40:41 UTC (rev 1788)
@@ -1,179 +0,0 @@
-# -*- CPerl -*-
-# $Id$
-package Siesta::Config;
-use strict;
-use AppConfig qw(:expand :argcount);
-use base qw( AppConfig Exporter );
-our @EXPORT = qw( $config );
-
-our $config = Siesta::Config->new({
-    GLOBAL => {
-        ARGCOUNT => ARGCOUNT_ONE,
-        EXPAND   => EXPAND_ALL,
-    },
-});
-
-
-=head1 NAME
-
-Siesta::Config - organise the configuration of a Siesta install
-
-=head1 SYNOPSIS
-
- use Siesta::Config;
- print $config->root; # /usr/local/siesta
-
-=cut
-
-our $CONFIG_FILE = '@@ROOT@@/siesta.conf'
-  unless defined $CONFIG_FILE;
-
-=head1 Configuration file
-
-Where the config file is.  Currently
-
- @@ROOT@@/siesta.conf
-
-This can be overridden when using the command line tools by
-using
-
- -f <new config file>
-
-or by calling
-
- $config->file( 'new config file' );
-
-
-=head1 Configuration variables
-
-=over
-
-=item root
-
-Where to install - the default base of everything.  The system default
-was set at install time to the value:
-
- @@ROOT@@
-
-=cut
-
-$config->define( root => { DEFAULT => '@@ROOT@@' } );
-
-
-=item messages
-
-Where our message templates are stored.
-
-By default - @@ROOT@@/messages
-
-=cut
-
-$config->define( messages => { DEFAULT => '@@ROOT@@/messages' } );
-
-
-=item archive
-
-Where we archive list mails.
-
-By default - @@ROOT@@/archive
-
-=cut
-
-$config->define( archive => { DEFAULT => '@@ROOT@@/archive' } );
-
-
-=item digests
-
-Where we save our digest spools
-
-By default = @@ROOT@@/digests
-
-=cut
-
-$config->define( digests => { DEFAULT => '@@ROOT@@/digests' } );
-
-=item log_path
-
-Where we log things
-
-By default - @@ROOT@@/error
-
-=cut
-
-$config->define( log_path => { DEFAULT => '@@ROOT@@/error' } );
-
-
-=item log_level
-
-By default - 3
-
-=cut
-
-$config->define( log_level => { DEFAULT => 3 } );
-
-
-=item storage_dsn
-
-The DSN for our local DB
-
-By default - dbi:SQLite:@@ROOT@@/database
-
-=cut
-
-$config->define( storage_dsn => { DEFAULT => 'dbi:SQLite:@@ROOT@@/database' } );
-
-
-=item storage_user
-
-The user name for our DB
-
-By default - root
-
-=cut
-
-$config->define( storage_user => { DEFAULT => 'root' } );
-
-
-=item storage_pass
-
-The password for our DB
-
-By default - undef
-
-=cut
-
-$config->define( storage_pass => { DEFAULT => undef } );
-
-$config->define( log_config => { DEFAULT => '/usr/local/siesta/log.conf' } );
-
-
-=head1 CREATION
-
-This file is autogenerated from Config.pm.in when you run Build.PL
-
-=cut
-
-sub load_from {
-    my $self = shift;
-    my $file = shift;
-    $self->file($file) if -e $file;
-}
-
-$config->load_from( $CONFIG_FILE );
-
-sub storage {
-    my $self = shift;
-    if (@_) {
-        my ($dsn, $user, $pass) = @_;
-        $config->storage_dsn( $dsn );
-        $config->storage_user( $user );
-        $config->storage_pass( $pass );
-    }
-    return (
-        $config->storage_dsn, $config->storage_user, $config->storage_pass,
-       );
-
-}
-
-
-1;


Property changes on: trunk/siesta/lib/Siesta
___________________________________________________________________
Name: svn:ignore
   - Config.pm

   + 


Added: trunk/siesta/lib/Siesta/Config.pm
===================================================================
--- trunk/siesta/lib/Siesta/Config.pm	2005-01-26 22:18:05 UTC (rev 1787)
+++ trunk/siesta/lib/Siesta/Config.pm	2005-01-26 23:40:41 UTC (rev 1788)
@@ -0,0 +1,177 @@
+package Siesta::Config;
+use strict;
+use AppConfig qw(:expand :argcount);
+use base qw( AppConfig Exporter );
+our @EXPORT = qw( $config );
+
+our $config = Siesta::Config->new({
+    GLOBAL => {
+        ARGCOUNT => ARGCOUNT_ONE,
+        EXPAND   => EXPAND_ALL,
+    },
+});
+
+
+=head1 NAME
+
+Siesta::Config - organise the configuration of a Siesta install
+
+=head1 SYNOPSIS
+
+ use Siesta::Config;
+ print $config->root; # /usr/local/siesta
+
+=cut
+
+our $CONFIG_FILE = '/usr/local/siesta/siesta.conf'
+  unless defined $CONFIG_FILE;
+
+=head1 Configuration file
+
+Where the config file is.  Currently
+
+ /usr/local/siesta/siesta.conf
+
+This can be overridden when using the command line tools by
+using
+
+ -f <new config file>
+
+or by calling
+
+ $config->file( 'new config file' );
+
+
+=head1 Configuration variables
+
+=over
+
+=item root
+
+Where to install - the default base of everything.  The system default
+was set at install time to the value:
+
+ /usr/local/siesta
+
+=cut
+
+$config->define( root => { DEFAULT => '/usr/local/siesta' } );
+
+
+=item messages
+
+Where our message templates are stored.
+
+By default - /usr/local/siesta/messages
+
+=cut
+
+$config->define( messages => { DEFAULT => '/usr/local/siesta/messages' } );
+
+
+=item archive
+
+Where we archive list mails.
+
+By default - /usr/local/siesta/archive
+
+=cut
+
+$config->define( archive => { DEFAULT => '/usr/local/siesta/archive' } );
+
+
+=item digests
+
+Where we save our digest spools
+
+By default = /usr/local/siesta/digests
+
+=cut
+
+$config->define( digests => { DEFAULT => '/usr/local/siesta/digests' } );
+
+=item log_path
+
+Where we log things
+
+By default - /usr/local/siesta/error
+
+=cut
+
+$config->define( log_path => { DEFAULT => '/usr/local/siesta/error' } );
+
+
+=item log_level
+
+By default - 3
+
+=cut
+
+$config->define( log_level => { DEFAULT => 3 } );
+
+
+=item storage_dsn
+
+The DSN for our local DB
+
+By default - dbi:SQLite:/usr/local/siesta/database
+
+=cut
+
+$config->define( storage_dsn => { DEFAULT => 'dbi:SQLite:/usr/local/siesta/database' } );
+
+
+=item storage_user
+
+The user name for our DB
+
+By default - root
+
+=cut
+
+$config->define( storage_user => { DEFAULT => 'root' } );
+
+
+=item storage_pass
+
+The password for our DB
+
+By default - undef
+
+=cut
+
+$config->define( storage_pass => { DEFAULT => undef } );
+
+$config->define( log_config => { DEFAULT => '/usr/local/siesta/log.conf' } );
+
+
+=head1 CREATION
+
+This file is autogenerated from Config.pm.in when you run Build.PL
+
+=cut
+
+sub load_from {
+    my $self = shift;
+    my $file = shift;
+    $self->file($file) if -e $file;
+}
+
+$config->load_from( $CONFIG_FILE );
+
+sub storage {
+    my $self = shift;
+    if (@_) {
+        my ($dsn, $user, $pass) = @_;
+        $config->storage_dsn( $dsn );
+        $config->storage_user( $user );
+        $config->storage_pass( $pass );
+    }
+    return (
+        $config->storage_dsn, $config->storage_user, $config->storage_pass,
+       );
+
+}
+
+
+1;

Generated at 00:00 on 27 Jan 2005 by mariachi 0.52