projects
/
ssic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Exit on failure to open files.
[ssic.git]
/
src
/
ssic.pl
diff --git
a/src/ssic.pl
b/src/ssic.pl
index f87aa9e5df96af57219a219e4a3a704aa5fe0781..553f83d00162787b840086237886d91e2df5ff4b 100644
(file)
--- a/
src/ssic.pl
+++ b/
src/ssic.pl
@@
-112,13
+112,23
@@
sub compile
error(4, "Input and output files are equal\n");
}
error(4, "Input and output files are equal\n");
}
- open($input_fh, "<", $input);
- open($output_fh, ">", $output);
+ if (not open($input_fh, "<", $input)) {
+ error(4, "%s: %s\n", $input, $!);
+ }
+ if (not open($output_fh, ">", $output)) {
+ error(4, "%s: %s\n", $output, $!);
+ }
- %ENV = ();
+ %ENV = (
+ "DOCUMENT_NAME" => $input,
+ "DOCUMENT_URI" => $input,
+ );
$CGI::SSI::DEBUG = 0;
$CGI::SSI::DEBUG = 0;
- $ssi = CGI::SSI->new();
+ $ssi = CGI::SSI->new(
+ "DOCUMENT_NAME" => $input,
+ "DOCUMENT_URI" => $input,
+ );
while (($var_name, $var_value) = each(%{$vars})) {
$ssi->set($var_name => $var_value);
while (($var_name, $var_value) = each(%{$vars})) {
$ssi->set($var_name => $var_value);