6 if (!$ENV{TEST_SIGNATURE
}) {
8 "Set the environment variable TEST_SIGNATURE to enable this test.";
10 elsif (!eval { require Module
::Signature
; 1 }) {
12 "Next time around, consider installing Module::Signature, ".
13 "so you can verify the integrity of this distribution.";
15 elsif ( !-e
'SIGNATURE' ) {
16 plan skip_all
=> "SIGNATURE not found";
18 elsif ( -s
'SIGNATURE' == 0 ) {
19 plan skip_all
=> "SIGNATURE file empty";
21 elsif (!eval { require Socket
; Socket
::inet_aton
('pgp.mit.edu') }) {
22 plan skip_all
=> "Cannot connect to the keyserver to check module ".
29 my $ret = Module
::Signature
::verify
();
31 skip
"Module::Signature cannot verify", 1
32 if $ret eq Module
::Signature
::CANNOT_VERIFY
();
34 cmp_ok
$ret, '==', Module
::Signature
::SIGNATURE_OK
(), "Valid signature";