Bio-Grid-Run-SGE
view release on metacpan or search on metacpan
scripts/cl_syntax_error.pl view on Meta::CPAN
job->run(
{
task => sub {
my ( $result_prefix, $idx_item ) = @_;
job->log->info("Running $idx_item->[0] -> $result_prefix");
jspew( $result_prefix . ".env.json", \%ENV );
jspew( $result_prefix . ".item.json", $idx_item );
sleep 1;
function_that_does_not_exist();
},
post_task => sub {
my $c = job->config;
open my $fh, '>', File::Spec->catfile( $c->{result_dir}, 'finished' )
or die "Can't open filehandle: $!";
say $fh job->env('job_id');
$fh->close;
},
usage => \&usage,
t/boilerplate.t view on Meta::CPAN
#!perl -T
use strict;
use warnings;
use Test::More tests => 1;
sub not_in_file_ok {
my ($filename, %regex) = @_;
open( my $fh, '<', $filename )
or die "couldn't open $filename for reading: $!";
my %violated;
while (my $line = <$fh>) {
while (my ($desc, $regex) = each %regex) {
if ($line =~ $regex) {
push @{$violated{$desc}||=[]}, $.;
t/boilerplate.t view on Meta::CPAN
if (%violated) {
fail("$filename contains boilerplate text");
diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
} else {
pass("$filename contains no boilerplate text");
}
}
sub module_boilerplate_ok {
my ($module) = @_;
not_in_file_ok($module =>
'the great new $MODULENAME' => qr/ - The great new /,
'boilerplate description' => qr/Quick summary of what the module/,
'stub function definition' => qr/function[12]/,
);
}
module_boilerplate_ok('lib/Bio/Grid/Run/SGE.pm');
( run in 0.411 second using v1.01-cache-2.11-cpan-0a987023a57 )