Astro-satpass

 view release on metacpan or  search on metacpan

eg/passes  view on Meta::CPAN

	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

    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

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 0.445 second using v1.01-cache-2.11-cpan-49f99fa48dc )