e for input\n";
binmode(TEMPLATE, ':utf8') if $self->use_utf8;
my $template_text = do {local $/; <TEMPLATE>};
close TEMPLATE;
return $template_text;
}
sub render {
my ($self, $tem
return unless /\.pm$/;
my $text = undef;
if (-f && -r) {
open IN, $_;
$text = do { local $/; <IN> };
close IN;
$HANDLERS{ $_ }{TEXT} = $text;
}
}
sub load_handlers {
my ($self
MPLATES->{$_}{error}) {
return
}
if (-f && -r) {
open IN, $_;
my $text = do { local $/; <IN> };
close IN;
unless ($TEMPLATES->{$_}{code} = Template::Document->new( $PARSER->pa
ly
close the file at block exit. If the file is already open, just use this:
$var = do { local $/; <INPUT> };
For ordinary files you can also use the read function.
read( INPUT, $var, -s INPU
{
my $test_out = do { local $/; <DATA> };
skip( "Can't fork '$^X': $!", 1)
unless open my $fh, qq[$^X "-I../lib" $pod_functions |];
my $fake_out = do { local $/; <$fh> };
skip( "Pipe err
open UIN, '<:utf8', 'Uni_write.tmp' or die "Can't open Uni_write.tmp";;
my $result = do { local $/; <UIN>; };
close UIN;
is($result, $expect, $name);
}
fmwrtest OUT1 => <<EOFORMAT, <<EOEXPE
$!;
$data .= do {local $/; <FILE>};
close FILE;
}
$data =~ s/^=/^=/gm;
open MODULE, $filename
or die $!;
my $module_text = do {local $/;<MODULE>};
close MODUL
e for input\n";
binmode(TEMPLATE, ':utf8') if $self->use_utf8;
my $template_text = do {local $/; <TEMPLATE>};
close TEMPLATE;
return $template_text;
}
sub render {
my ($self, $tem
g_path for input:\n$!";
binmode(BLOG, ':utf8') if $self->use_utf8;
my $blog_text = do {local $/; <BLOG>};
close BLOG;
my $page_id = ($blog_text =~ /^page_id:\s+(.*)/m) ? $1 : '';
m
lf->{API}->{location};
open BASIC_OBJ, "< $obj" or _croak "$obj: $!";
my $code = do { local $/; <BASIC_OBJ> };
close BASIC_OBJ;
eval "package $self->{API}->{pkg};\n$code";
_croak