use server;
use format;
+our $debug = $server::debug;
+
sub mkbasedir {
my $path = shift;
$path =~ s{(^.*)/[^/]+$}{$1};
} elsif ( -f $path ) {
$value = read_file $path;
} else {
- confess "conf $name";
+ warn "# $name missing $path\n" if $debug;
}
return $value;
}
use strict;
use autodie;
-use Test::More tests => 13;
+use Test::More tests => 14;
use Data::Dump qw/dump/;
use English;
ok( client::conf( $host => 'test' => 'value' ), 'conf set' );
cmp_ok( client::conf( $host => 'test' ), 'eq', 'value', 'value' );
+ok( ! client::conf( $host => 'non-existing' ), 'conf non-existing' );
+
ok( my $ip = client::next_ip( $mac ), 'next_ip' );
diag $ip;