+ # Check that key directory exists
+ if (! -d KEY_DIR) {
+ # Create all paths
+ make_path(KEY_DIR, {error => \my $err});
+ if (@$err) {
+ map {
+ my ($file, $msg) = %$_;
+ carp ($file eq '' ? '' : $file.': ').$msg if ($debug);
+ } @$err;
+ confess 'make_path failed';
+ }
+ }
+