[prev] [thread] [next] [lurker] [Date index for 2003/07/27]
Author: richardc Date: 2003-07-27 22:19:19 +0100 (Sun, 27 Jul 2003) New Revision: 1259 Modified: trunk/siesta/Config.pm.in trunk/siesta/lib/Siesta/Web.pm Log: expose the AppConfig item, use that instead of the hardcoded path Modified: trunk/siesta/Config.pm.in ============================================================================== --- trunk/siesta/Config.pm.in 2003-07-27 21:10:14 UTC (rev 1258) +++ trunk/siesta/Config.pm.in 2003-07-27 21:19:19 UTC (rev 1259) @@ -1,7 +1,7 @@ # $Id$ package Siesta::Config; use strict; -use vars qw( $CONFIG_FILE $ROOT $MESSAGES @STORAGE $ARCHIVE $LOG_PATH $LOG_LEVEL ); +use vars qw( $CONFIG_FILE $ROOT $MESSAGES @STORAGE $ARCHIVE $LOG_PATH $LOG_LEVEL $config ); =head2 C<$ROOT> @@ -15,9 +15,8 @@ $ROOT = '@@ROOT@@'; $CONFIG_FILE = '@@ROOT@@/siesta.conf' unless defined $CONFIG_FILE; - my $config = AppConfig->new({ - GLOBAL => { - ARGCOUNT => ARGCOUNT_ONE, + $config = AppConfig->new({ + GLOBAL => { ARGCOUNT => ARGCOUNT_ONE, EXPAND => EXPAND_ALL, }, }, Modified: trunk/siesta/lib/Siesta/Web.pm ============================================================================== --- trunk/siesta/lib/Siesta/Web.pm 2003-07-27 21:10:14 UTC (rev 1258) +++ trunk/siesta/lib/Siesta/Web.pm 2003-07-27 21:19:19 UTC (rev 1259) @@ -3,8 +3,9 @@ use Apache::Constants qw( :common ); use Template; use Apache::Session::SharedMem; -use Siesta; use CGI; +use Siesta; +use Siesta::Config; use constant Cookie => 'siesta_session'; @@ -43,12 +44,10 @@ session => \%session, }; + my $root = $Siesta::Config::config->('root'). $tt ||= Template->new( ABSOLUTE => 1, - INCLUDE_PATH => join (':', - '/home/richardc/siesta-trunk/siesta/web-frontend/siesta', - '/home/richardc/siesta-trunk/siesta/web-frontend/lib' ), - ); + INCLUDE_PATH => "$root/web-frontend/siesta:$root/web-frontend/lib" ); my $out; $tt->process($file, $params, \$out)
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52