Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Getopt-Long-Descriptive CPAN distribution.

Report information
The Basics
Id: 40441
Status: resolved
Priority: 0/
Queue: Getopt-Long-Descriptive

People
Owner: Nobody in particular
Requestors: andrewo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.074
Fixed in: (no value)



Subject: Document optional parameters to $usage->die()
Hi! Just started using your module - thanks for working on this. One thing I nearly always need to do is die with usage prepended with a reason for the failure when a user has provided a value that is out of range or otherwise invalid. I was just starting to add this functionality to your when I saw that $usage->die() can already take an optional hashref with pre_text and post_text arguments. So, attached is a small patch that simply documents these optional arguments :) Cheers, Andrew
Subject: descriptive.pm.diff
--- Descriptive.pm.orig 2008-05-11 21:46:01.000000000 +1000 +++ Descriptive.pm 2008-10-28 11:29:05.000000000 +1100 @@ -163,6 +163,17 @@ =item * C<< $usage->die >> dies with the usage string +=item * C<< $usage->die( $hashref ) >> As above but with the usage +output optionally modified. The possible members of the hashref are: + +=over 4 + +=item * pre_text - Value is prepended to the usage statement + +=item * post_text - Value is appended to the usage statement + +=back + =back =head2 C<< prog_name >>
this was done some time ago when the ::Usage class was added -- rjbs