[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: A common base exception object for Perl - RFC
Pete Jordan writes:
: There's no implicit connection between this call interface and the
: internal implementation. My sole reason for this is to allow named
: parameters without having to suffer the overhead of generating a hashref
: for the call; the leading '-'s are just there to make it easy to
: identify key names. Remember from my original message that I'm allowing
: calls like:
:
: my $e=new Exception 'arbitrary error text' -exitcode=>5;
:
: Of course, if this interface gets shot down in flames, anything goes...
The trouble is that the - is really redundant with the =>. I've been
thinking for a long time that there ought to be a way to determine
whether a given argument in a list was followed by a => rather than a
comma. Then you could write a subroutine that processes an arbitrary
list of single arguments followed by an arbitrary list of paired
arguments. Or a prototype of % could guarantee that you don't get out
of sync. (At the moment, a prototype of % is treated just like @.)
Larry
- Follow-Ups from:
-
"Matthias Urlichs" <smurf@noris.net>
Pete Jordan <pjordan1@email.mot.com>
- References to:
-
Pete Jordan <pjordan1@email.mot.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]