# The following was supposedly scribed by
# Caleb Epstein
# on Tuesday 29 June 2004 11:27 pm:
-f, --force, --noforce force overwrite of existing files (default:
no)
I assume that for this module to know that --noforce is
viable, you mistakenly omitted the ! at the end
Eric Wilhelm [EMAIL PROTECTED] writes:
I'm not super happy with the array-reference interface (it assumes a
lot and lines tend to need a lot of re-wrapping), but it gets
everything into one place rather than scattered about and allows the
variables to tell the user their default values (even
# The following was supposedly scribed by
# [EMAIL PROTECTED]
# on Saturday 26 June 2004 05:31 am:
Andy mentioned Getopt::Declare. I've briefly taken a look at it a few
times, and I did so again when he mentioned it. I guess I never really
got it. It doesn't seem to solve the problem, but since
On Tue, Jun 29, 2004 at 09:50:06PM -0500, Eric Wilhelm wrote:
my $hopt = Getopt::Helpful-new(
[...]
['f|force',\$force, ' ',
force overwrite of existing files (default: .
($force ? yes : no) . )],
[ ... ]
-f, --force, --noforce force
On 6/25/2004 10:47 AM, Eric Wilhelm wrote:
# The following was supposedly scribed by
# Randy W. Sims
# on Thursday 24 June 2004 10:40 pm:
You'll want
to subclass Pod::Text, override the proper method to add a new escape
sequence (say $variable_name), then maybe override the constructor to
take a
* Eric Wilhelm [EMAIL PROTECTED] [2004-06-25 05:11]:
I've seen pod2usage() and this would work, but most of these
scripts have some defaults set for variables that can be
changed with the GetOptions flags and I'd like to show these
defaults at least in the help message.
You are looking for
my $rounding = 0.01;
GetOptions(
'round=f' = \$rounding,
'help' = sub {usage()},
);
sub usage {
print usage: $0 filename\n;
print options: --round float (default $rounding)\n;
}
END
This will have a nasty side effect, as shown below:
$
A. Pagaltzis wrote:
* Eric Wilhelm [EMAIL PROTECTED] [2004-06-25 05:11]:
I've seen pod2usage() and this would work, but most of these
scripts have some defaults set for variables that can be
changed with the GetOptions flags and I'd like to show these
defaults at least in the help message.
# The following was supposedly scribed by
# Johan Vromans
# on Friday 25 June 2004 03:00 am:
This will have a nasty side effect, as shown below:
$ round --round=42 --help
usage: round filename
options: --round float (default 42)
Yes, this is correct. But I was planning something
# The following was supposedly scribed by
# Randy W. Sims
# on Thursday 24 June 2004 10:40 pm:
You'll want
to subclass Pod::Text, override the proper method to add a new escape
sequence (say $variable_name), then maybe override the constructor to
take a hash with the values for the variables or
Hi everybody!
I'm going to be documenting a system of (30+) programs with is mostly scripts,
rather than modules. I know you can just put pod text in your scripts, but
I'd like to also integrate the usage messages into the pods (or get them from
the pods.)
I've seen pod2usage() and this
On 6/24/2004 11:11 PM, Eric Wilhelm wrote:
Hi everybody!
I'm going to be documenting a system of (30+) programs with is mostly scripts,
rather than modules. I know you can just put pod text in your scripts, but
I'd like to also integrate the usage messages into the pods (or get them from
the
I've seen pod2usage() and this would work, but most of these scripts
have some
defaults set for variables that can be changed with the GetOptions
flags and
I'd like to show these defaults at least in the help message.
Take a look at, I believe, GetOpt::Declare. It's one of Damian's.
xoxo,
Andy
13 matches
Mail list logo