our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.0;
@ISA = qw(Exporter);
- @EXPORT = qw(&Init &Log &Notice &Fail &IsSet &Set &UnSet &Append &Override &Get &Test &Include &Finish &FindFile &TryFindFile);
+ @EXPORT = qw(&Init &Log &Notice &Warn &Fail &IsSet &Set &UnSet &Append &Override &Get &Test &Include &Finish &FindFile &TryFindFile);
@EXPORT_OK = qw();
%EXPORT_TAGS = ();
}
print @_ if $vars{"VERBOSE"};
}
+sub Warn($) {
+ print "WARNING: ", @_;
+}
+
sub Fail($) {
- Log((shift @_) . "\n");
+ Log("ERROR: " . (shift @_) . "\n");
exit 1;
}
if ($x =~ /^(\w+)=(.*)/) {
Override($1 => $2);
} elsif ($x =~ /^-(\w+)$/) {
- Override($1 => 1);
+ Override($1 => 0);
delete $vars{$1};
} elsif ($x =~ /^(\w+)$/) {
Override($1 => 1);
} else {
- print STDERR "Invalid option $_\n";
+ print STDERR "Invalid option $x\n";
exit 1;
}
}