App-CamelPKI
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use FindBin qw($Bin);
use lib "$Bin/inc";
# Note: this file was auto-generated by Module::Build::Compat version 0.30
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
require Cwd;
require File::Spec;
require CPAN;
inc/My/Module/Build.pm view on Meta::CPAN
Sets the FULL_DEBUGGING environment variable to 1 while running
C<./Build test>, in addition to any environment customization already
performed by L</customize_env>. Packages of mine that use L<Inline>
enable extra debugging when this environment variable is set.
=back
=head3 Dependent Option Graph
This feature wraps around L<Module::Build/prompt>,
L<Module::Build/get_options> and L<Module::Build/notes> to streamline
the programming of optional features into a ./Build.PL script. Here is
a short synopsis for this feature:
=for My::Tests::Below "option-graph" begin
my $class = My::Module::Build->subclass(code => <<'CODE');
sub install_everything: Config_Option {
question => "Install everything",
inc/My/Module/Build.pm view on Meta::CPAN
=item I<default>
In batch mode, the value to use if none is available from the command
line or the persisted answer set from previous attempts to run
./Build.PL. In interactive mode, the value to offer to the user as the
default.
=item I<mandatory>
A Boolean indicating whether answering the question with a non-empty
value is mandatory (see also L</prompt> for a twist on what
"non-empty" exactly means). The default mandatoryness is 1 if
I<default> is not returned, 0 if I<default> is returned (even with an
undef value).
=back
=head1 REFERENCE
=cut
inc/My/Module/Build.pm view on Meta::CPAN
One of the tests in t/maintainer will fail because of that. Please
install the corresponding module to run the full test suite.
MESSAGE
}
}
=item I<show_warning($message)>
Displays a multi-line message $message to the user, and prompts
him/her to "Press RETURN to continue".
=cut
sub show_warning {
my ($self, $message) = @_;
$message = "\n$message" until ($message =~ m/^\n\n/);
$message .= "\n" until ($message =~ m/\n\n$/);
warn $message;
$self->prompt("Press RETURN to continue");
1;
}
=item I<show_fatal_error($message)>
Like L</show_warning>, but throws an exception after displaying
$message.
=cut
inc/My/Module/Build.pm view on Meta::CPAN
};
my $default = $self->_option_default_value($key);
if (defined(my $question = $self->_option_question($key))) { # Ask user
if ($self->_option_type($key) eq "boolean") {
$default = $default ? "yes" : "no";
}
ASK_AGAIN: {
my $answer = $self->prompt($question, $default);
my $problem = $self->_option_check_value($key, \$answer);
return $answer if (! $problem);
if (-t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT))) {
warn $problem;
redo ASK_AGAIN;
} else {
die $problem;
}
}
inc/My/Module/Build.pm view on Meta::CPAN
HEADER
return "Fake::Subclass";
};
sub notes {
my ($self, $k, @v) = @_;
if (@v) { $self->{notes}->{$k} = $v[0]; }
return $self->{notes}->{$k};
}
# "batch" version of ->prompt()
our %answers = ("Install module foo?" => 1);
sub prompt {
my ($self, $question) = @_;
die "Unexpected question $question" if
(! exists $answers{$question});
return delete $answers{$question}; # Will not answer twice
# the same question
}
package main_screen; # Do not to pollute the namespace of "main" with
# the "use" directives below - Still keeping refactoring in mind.
( run in 2.417 seconds using v1.01-cache-2.11-cpan-6aa56a78535 )