Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/ContentGenerator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18521/ContentGenerator
Modified Files:
TemplateSource.pm
Log Message:
minor: put off bringing in OI2::SiteTemplate until runtime since it's part of
a package
Index: TemplateSource.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/ContentGenerator/TemplateSource.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TemplateSource.pm 5 Dec 2004 21:02:08 -0000 1.12
--- TemplateSource.pm 24 Jan 2005 17:13:31 -0000 1.13
***************
*** 8,15 ****
use OpenInteract2::Context qw( CTX );
use OpenInteract2::Exception qw( oi_error );
- use OpenInteract2::SiteTemplate;
$OpenInteract2::ContentGenerator::TemplateSource::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
my ( $log );
--- 8,16 ----
use OpenInteract2::Context qw( CTX );
use OpenInteract2::Exception qw( oi_error );
$OpenInteract2::ContentGenerator::TemplateSource::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
+ my $REQUIRED = 0;
+
my ( $log );
***************
*** 17,20 ****
--- 18,22 ----
my ( $class, $template_source ) = @_;
$log ||= get_logger( LOG_TEMPLATE );
+ $REQUIRED || require OpenInteract2::SiteTemplate && $REQUIRED++;
unless ( ref $template_source eq 'HASH' ) {
|