Update of /cvsroot/openinteract/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29969
Modified Files:
build_bricks
Log Message:
OIN-121: scrap use of Inline::Files since it was throwing a weird error probably based on the same pattern ('__BLAH__') being found in the text of the files inlined), so just use subs instead
Index: build_bricks
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/build_bricks,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** build_bricks 28 Jan 2005 16:43:13 -0000 1.3
--- build_bricks 28 Jan 2005 17:07:32 -0000 1.4
***************
*** 141,148 ****
use strict;
use base qw( OpenInteract2::Brick );
! use Inline::Files;
! use OpenInteract2::Exception qw( oi_error );
! my %INLINES = (
[% FOREACH file_info = all_files -%]
'[% file_info.name %]' => '[% file_info.inline_name %]',
--- 141,147 ----
use strict;
use base qw( OpenInteract2::Brick );
! use OpenInteract2::Exception;
! my %INLINED_SUBS = (
[% FOREACH file_info = all_files -%]
'[% file_info.name %]' => '[% file_info.inline_name %]',
***************
*** 164,173 ****
sub load {
my ( $self, $resource_name ) = @_;
! my $inline_name = $INLINES{ $resource_name };
! unless ( $inline_name ) {
! oi_error "Resource name '$resource_name' not found ",
! "in ", ref( $self ), "; cannot load content.";
}
! return join( '', <$inline_name> );
}
--- 163,173 ----
sub load {
my ( $self, $resource_name ) = @_;
! my $inline_sub_name = $INLINED_SUBS{ $resource_name };
! unless ( $inline_sub_name ) {
! OpenInteract2::Exception->throw(
! "Resource name '$resource_name' not found ",
! "in ", ref( $self ), "; cannot load content." );
}
! return $self->$inline_sub_name();
}
***************
*** 204,209 ****
[% FOREACH file_info = all_files %]
! __[% file_info.inline_name %]__
[% file_info.contents %]
!
[% END %]
--- 204,211 ----
[% FOREACH file_info = all_files %]
! sub [% file_info.inline_name %] {
! return <<'SOMELONGSTRING';
[% file_info.contents %]
! SOMELONGSTRING
! }
[% END %]
|