Astro-satpass

 view release on metacpan or  search on metacpan

eg/passes  view on Meta::CPAN

217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
        local_strftime( $opt{time_format}, $time );
}
 
# load_file( $file_name );
# Load the contents of a file.
sub load_file  {
    my ( $fn ) = @_;
    my $fh;
    open $fh, '<', $fn       ## no critic (RequireBriefOpen)
        or die "Unable to open $fn: $!\n";
    local @ARGV;
    local $_ = undef;
    while ( <$fh> ) {
        s/ \s+ \z //smx;
        '' eq $_ and next;
        s/ \A \s+ //smx;
        '#' eq substr $_, 0, 1 and next;
        push @ARGV, $_;
    }
    close $fh;
    GetOptions( \%opt, @lgl_opt )

inc/My/Module/Satpass.pm  view on Meta::CPAN

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
    plan tests => $test, todo => \@todo;
    %h_todo = map {$_ => 1} @todo;
 
#       We start from test 1 (since we increment before use).
 
    $test = 0;
 
#       Set up the command arguments and 'do' the satpass script. All
#       further work is done by tester() when the script calls it.
 
    local @ARGV = ('-filter', -initialization_file => File::Spec->devnull ());
    $skip = '';
    do $script;
    print $@ if $@;
    return;
}
 
#       not_available(module ...) is a utility to determine whether the
#       given modules are available. If so, it loads them. If not, it
#       returns a message for the first module that can not be loaded.

script/satpass  view on Meta::CPAN

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
eod
        next;
        };
 
#       Parse any command options present. Note that GetOptions is
#       configured to pass any unrecognized options because otherwise
#       our relative time format would confuse it.
 
    %cmdopt = ();
    {   # Begin local symbol block.
        local @ARGV = @args;
        Getopt::Long::Configure (@{$cmdconfig{$verb} ||= ['permute']});
        GetOptions (\%cmdopt, qw{clipboard debug time}, @{$cmdlgl{$verb} ||= []});
        @args = @ARGV;
        }
    $cmdopt{_redirection} = $cmdopt{clipboard} ? '-clipboard' : $redout;
 
#       Preserve our current output, and redirect as and if specified.
 
    if ($cmdopt{clipboard}) {
        $redout = '';



( run in 1.031 second using v1.01-cache-2.11-cpan-49f99fa48dc )