Changeset 13811 for trunk/core/lib/Foswiki/Templates.pm
- Timestamp:
- 01/24/12 09:31:40 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/lib/Foswiki/Templates.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/Templates.pm
r13537 r13811 612 612 $tmpl_cachedir . '/' . $name . '__' . $skins . '__' . $web . '.tmpl' ); 613 613 614 unless ( open( FILE, ">$filename") ) {614 unless ( open( my $file, '>', $filename ) ) { 615 615 die "Can't create file $filename - $!\n" if DEBUG; 616 616 print STDERR "Can't create file $filename - $!\n"; … … 618 618 return; 619 619 } 620 print FILE$tmplText;621 close( FILE);620 print $file $tmplText; 621 close($file); 622 622 } 623 623 … … 634 634 635 635 if ( -e $filename ) { 636 open( IN_FILE, "<$filename" ) ||return;636 open( my $in_file, '<', $filename ) or return; 637 637 local $/ = undef; # set to read to EOF 638 my $data = < IN_FILE>;639 close( IN_FILE);638 my $data = <$in_file>; 639 close($in_file); 640 640 return $data; 641 641 }
Note: See TracChangeset
for help on using the changeset viewer.
