Developer-Dashboard
view release on metacpan or search on metacpan
lib/Developer/Dashboard/PageRuntime.pm view on Meta::CPAN
# _run_saved_ajax_perl_file($path)
# Executes one saved Perl Ajax file through the in-module bootstrap wrapper so
# Windows does not have to carry a multi-line `perl -e` payload through the
# native process command line.
# Input: saved Ajax Perl file path string.
# Output: true value after the wrapped file has been evaluated.
sub _run_saved_ajax_perl_file {
my ( $class, $path ) = @_;
die "Missing saved ajax Perl file path\n" if !defined $path || $path eq '';
my $wrapper = $class->_saved_ajax_perl_wrapper;
local @ARGV = ($path);
eval $wrapper;
die $@ if $@;
return 1;
}
# _code_header($state)
# Builds the older lexical stash header injected before each CODE block.
# Input: mutable stash hash reference.
# Output: Perl source string.
sub _code_header {
script/check-all-metric-coverage view on Meta::CPAN
# Purpose: classify a Devel::Cover text report arriving on standard input.
# Input: the raw @ARGV list; only --database is accepted, naming the coverage
# database to sniff when an instrument failure has to be explained.
# Output: an exit code - 0 all four metrics at 100.0, 1 a genuine shortfall,
# 2 the report could not be read, 3 the instrument could not read its
# own database.
sub main {
my @argv = @_;
my $database = 'cover_db';
local @ARGV = @argv;
GetOptions( 'database=s' => \$database )
or return _unreadable('unrecognized option; only --database is accepted');
return _unreadable( 'unexpected argument: ' . join ' ', @ARGV ) if @ARGV;
my @lines = <STDIN>;
# Echo the report first and flush it, so the verdict written to standard
# error cannot appear above the table it is a verdict about. Standard output
# is block-buffered whenever this runs in a pipeline, which is always.
local $| = 1;
script/coverage-gate view on Meta::CPAN
# instrument could not read its own database, 4 another gate already
# holds the database and this run refused rather than corrupt it, 5 the
# tree moved while the suite ran so the number describes no single state
# of it.
sub main {
my @argv = @_;
my $database = 'cover_db';
my ( $dry_run, $help ) = ( 0, 0 );
local @ARGV = @argv;
GetOptions(
'database=s' => \$database,
'dry-run' => \$dry_run,
'help' => \$help,
) or return _usage('unrecognized option');
if ($help) {
print _usage_text();
return EXIT_CLEAN;
}
script/cpan-audit-declared-chain view on Meta::CPAN
# Output: an exit code - 0 clean, 1 at least one permitted vulnerable
# resolution, 2 the gate could not audit anything and refuses to
# report a clean result it did not establish.
sub main {
my @argv = @_;
my $repo_root = File::Spec->rel2abs( File::Spec->catdir( dirname(__FILE__), File::Spec->updir ) );
my $cpanfile = File::Spec->catfile( $repo_root, 'cpanfile' );
my $exclusions = File::Spec->catfile( $repo_root, 'cpan-audit-exclusions.txt' );
local @ARGV = @argv;
GetOptions(
'cpanfile=s' => \$cpanfile,
'exclude-file=s' => \$exclusions,
) or return _usage('unrecognized option');
my @positional = @ARGV;
return _usage('exactly one Perl library root is required')
if @positional != 1;
my $perl5_root = $positional[0];
return _usage("not a directory: $perl5_root") if !-d $perl5_root;
( run in 2.729 seconds using v1.01-cache-2.11-cpan-5c0b1e786e0 )