Subject: | [PATCH] Should be able to build without prompts |
For packaging it would be great if it was possible to build the module
without prompts. For instance, the attached patch adds a
MODULE_SIGNATURE_GPG_KEY_IMPORT environment variable check, allowing the
prompt to be skipped in a packaging context.
Cheers,
Gavin
Subject: | perl-Module-Signature-0.66-makefilepl-noprompt.patch |
From 7e2d3af6b967ffe4b5bb0eb8ec6531e9f3d9b34d Mon Sep 17 00:00:00 2001
From: Gavin Carr <gavin@openfusion.com.au>
Date: Wed, 23 Feb 2011 17:20:47 +0000
Subject: [PATCH] Add MODULE_SIGNATURE_GPG_KEY_IMPORT env variable check to Makefile.PL.
---
Makefile.PL | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index a53b31c..889abd6 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -113,7 +113,8 @@ sub locate_gpg {
return 1 if grep { /^--installdeps/} @ARGV;
- if ( prompt("Import PAUSE and author keys to GnuPG?", 'y' ) =~ /^y/i) {
+ if ( $ENV{MODULE_SIGNATURE_GPG_KEY_IMPORT} ||
+ prompt("Import PAUSE and author keys to GnuPG?", 'y') =~ /^y/i) {
print 'Importing... ';
system 'gpg', '--quiet', '--import', glob('*.pub');
print "done.\n";
--
1.7.1