aboutsummaryrefslogtreecommitdiff
path: root/sboconfig
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-06-11 23:05:21 -0500
committerJacob Pipkin <j@dawnrazor.net>2012-06-11 23:05:21 -0500
commit8dfe0461d5e4ae3ef31c0a01a9cc04e7334a458c (patch)
treed9c78b0077beb355f19075614759074b1ecc09b2 /sboconfig
parent3fe7112f8c96478a55eeebe0d63665c1435c5dda (diff)
downloadsbotools2-8dfe0461d5e4ae3ef31c0a01a9cc04e7334a458c.tar.xz
bunch more code reductions and stuff
Diffstat (limited to 'sboconfig')
-rwxr-xr-xsboconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/sboconfig b/sboconfig
index e9a2ff6..4cb7278 100755
--- a/sboconfig
+++ b/sboconfig
@@ -14,6 +14,7 @@ use File::Basename;
use Getopt::Std;
use File::Copy;
use File::Path qw(make_path);
+use File::Temp qw(tempfile);;
my %config = %SBO::Lib::config;
my $self = basename ($0);
@@ -80,7 +81,7 @@ my $conf_file = $SBO::Lib::conf_file;
# safely modify our conf file; copy to a temp location, edit the temp file,
# move the edited file into place
sub config_write {
- script_error ('config_write requires two arguments.') unless exists $_[1];
+ exists $_[1] or script_error ('config_write requires two arguments.');
my ($key, $val) = @_;
if (! -d $conf_dir) {
mkdir ($conf_dir) or die "Unable to create $conf_dir. Exiting.\n";