aboutsummaryrefslogtreecommitdiff
path: root/lib/Net/MulkyID
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-10-09 11:49:09 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-10-09 11:49:09 +0200
commitb0011a6e2446129bd1f82381c02a0ad9c667afa3 (patch)
tree92e756dc98bc1ec2f586c731d6ec74ce0c5b8198 /lib/Net/MulkyID
parent81e909e9031d8f8a68101080f225b4a977ec0015 (diff)
build.PL: Fix dependencies.
Diffstat (limited to 'lib/Net/MulkyID')
-rw-r--r--lib/Net/MulkyID/Builder.pm4
-rwxr-xr-xlib/Net/MulkyID/Setup.pm4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Net/MulkyID/Builder.pm b/lib/Net/MulkyID/Builder.pm
index a1c000d..bd5058f 100644
--- a/lib/Net/MulkyID/Builder.pm
+++ b/lib/Net/MulkyID/Builder.pm
@@ -18,7 +18,9 @@ sub new {
sub ACTION_build {
my ($self, @args) = @_;
eval "use Net::MulkyID::Setup; setup();";
- #return SUPER::ACTION_build($self, @args);
+ if ($@) {
+ die $@;
+ }
}
1;
diff --git a/lib/Net/MulkyID/Setup.pm b/lib/Net/MulkyID/Setup.pm
index 8c58013..b79f96b 100755
--- a/lib/Net/MulkyID/Setup.pm
+++ b/lib/Net/MulkyID/Setup.pm
@@ -12,6 +12,7 @@ use File::Path qw(make_path);
use File::Copy;
use LWP::Simple qw(getstore);
use Data::Dumper;
+#use autodie;
use base 'Exporter';
our @EXPORT = qw(setup);
@@ -80,7 +81,8 @@ sub setup() {
} else {
say "Generating private key...";
$key = Crypt::OpenSSL::RSA->generate_key(2048);
- make_path($configpath);
+ make_path($configpath)
+ or die "Could not create directory: $configpath";
write_file($pemfile, $key->get_private_key_string())
or die "Could not write private key to $pemfile: $!";
say "Private key saved to: $pemfile";