sxmwb has asked for the wisdom of the Perl Monks concerning the following question:
I thought I would use a subroutine here but that does not allow AppConfig to display its errors.my $config = AppConfig->new( { CASE => 1, ERROR => \&my_error, GLOBAL => { DEFAULT => "<unset>", ARGCOUNT => ARGCOUNT_ONE, }, } );
Basically, I would like AppConfig to display its errors, print the pod2usage documentation, and exit. I will admit I do not understand what AppConfig is doing with the \&my_error and not been able to figure it out.my $config = AppConfig->new( { CASE => 1, ERROR => hanlde_errors(), GLOBAL => { DEFAULT => "<unset>", ARGCOUNT => ARGCOUNT_ONE, }, } );
Does any have examples of this? I have done searches here and used google but not much luck.
Thanks sxmwb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: AppConfig Error handling
by pc88mxer (Vicar) on May 04, 2008 at 15:06 UTC | |
|
Re: AppConfig Error handling
by FunkyMonk (Bishop) on May 04, 2008 at 14:45 UTC | |
|
Re: AppConfig Error handling
by sxmwb (Pilgrim) on May 05, 2008 at 22:39 UTC |