Getopt-Helpful

 view release on metacpan or  search on metacpan

lib/Getopt/Helpful.pm  view on Meta::CPAN

	unless(Getopt::Long::GetOptions(%opts)) {
		# does -h work?
		my $message = ($self->{has}{help} ? " (-h for help)" : "");
		die "invalid options$message\n";
	}
} # end subroutine Get definition
########################################################################

=head2 Get_from

Equivalent to Get(@extra), but treats @args as a localized @ARGV.

  $hopt->Get_from(\@args, @extra);

=cut
sub Get_from {
	my $self = shift;
	my ($args, @extra) = @_;
	local @ARGV = @$args;
	$self->Get(@extra);
	@$args = @ARGV;
} # end subroutine Get_from definition
########################################################################

=head2 ordered

Not finished yet.  The idea is to have one or more arguments that may be
just an ordered list on the command line so that your program could be
called as:

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.478 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )