~ubuntu-branches/debian/sid/libio-socket-ssl-perl/sid

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Package Import Robot
  • Author(s): Salvatore Bonaccorso
  • Date: 2015-06-03 20:34:18 UTC
  • mfrom: (1.8.6)
  • Revision ID: package-import@ubuntu.com-20150603203418-4vg4np3k9duvn740
Tags: 2.016-1
ImportĀ upstreamĀ versionĀ 2.016

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
$| = 1;
15
15
 
 
16
my $yesno = sub {
 
17
    my ($msg,$default) = @_;
 
18
    return $default if defined $default && $ENV{PERL_MM_USE_DEFAULT};
 
19
    # Taken from ExtUtils::MakeMaker 6.16 (Michael Schwern) so that
 
20
    # the prompt() function can be emulated for older versions of ExtUtils::MakeMaker.
 
21
    while ( -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT))) {
 
22
        print "$msg ";
 
23
        my $choice = <STDIN>;
 
24
        $choice =~s{\s+$}{};
 
25
        $choice ||= $default;
 
26
        next if $choice !~m{^\s*([yn])}i;
 
27
        return lc($1);
 
28
    }
 
29
 
 
30
    return $default;
 
31
};
 
32
 
16
33
{
17
34
    # issue warning, if Net::SSLeay cannot find random generator
18
35
    # redefine __WARN__ only locally to allow detection of failures
26
43
        print "to fail.  Please see the README file for more information.\n";
27
44
        print "the message from Net::SSLeay was: $warning\n";
28
45
 
29
 
        # Taken from ExtUtils::MakeMaker 6.16 (Michael Schwern) so that 
30
 
        # the prompt() function can be emulated for older versions of ExtUtils::MakeMaker.
31
 
        my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
32
 
        
33
 
        if ($isa_tty) {
34
 
            print "Do you REALLY want to continue? [Default: no] ";
35
 
            die "User cancelled install!\n" if (<STDIN> !~ /^y(?:es)?$/);
36
 
        } else {
37
 
            die "Install cancelled.\n";
38
 
        }
 
46
        $yesno->("Do you REALLY want to continue? y/[N]","n") eq 'y'
 
47
            or die "Install cancelled.\n";
39
48
    };
40
49
 
41
50
    if (! defined $ENV{SKIP_RNG_TEST}) {
109
118
}
110
119
 
111
120
my $xt = $ENV{NO_NETWORK_TESTING} && 'n';
112
 
$xt ||= prompt( "Should I do external tests?\n".
 
121
$xt ||= $yesno->( "Should I do external tests?\n".
113
122
    "These test will detect if there are network problems and fail soft,\n".
114
123
    "so please disable them only if you definitely don't want to have any\n".
115
 
    "network traffic to external sites.   ".
116
 
    "[Y/n]", 'y' );
 
124
    "network traffic to external sites.  [Y/n]", 'y' );
117
125
 
118
126
 
119
127
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
131
139
        ! %usable_ca ? ( 'Mozilla::CA' => 0 ):(),
132
140
    },
133
141
    'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz', },
134
 
    $xt =~m{^y}i ? ( test => { TESTS => 't/*.t t/external/*.t' }):(),
 
142
    $xt eq 'y' ? ( test => { TESTS => 't/*.t t/external/*.t' }):(),
135
143
    $ExtUtils::MakeMaker::VERSION >= 6.46 ? (
136
144
        'META_MERGE' => {
137
145
            resources => {