[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: A common base exception object for Perl - RFC
Stephen Zander wrote:
> As someone who bitched loud & long about this at the last conference I
> have one question: do you plan to fix all the croak calls in the
> current source code and/or supply some mechanism for XS programmers to
> Do The Right Thing as well? The whole point of having *any* exception
> class is wasted if it only applies to custome code
This will involve more digging into perlguts than I've yet done, but
yes, if this mechanism is to exist, it should work everywhere. AFAICS,
hacking C<Perl_vcroak()> and C<Perl_vdie()> should provide for C and
Perl compatibility respectively. Adding some sort of pseudo-object croak
interface for XS programmers is another kettle of dioxin-contaminated
lobsters altogether.
> and as along as you support the auto-stringification (is that a word?)
> of $@, the Backward Compatability Police can't touch you.
.sig changed :)
> BTW, as backwards compatability requires you to support
> auto-stringification of $@ anyway, why bother with a 'to_string'
> string method at all?
Well, the method has got to be there so stringification can happen (and
so exception subclasses can, errm, subclass it). There's no compulsion
for anyone to actually /use/ it explicitly...
Pete
--
use Disclaimer::Standard;
my $phone='+44 1793 564450'; # "THIS IS THE COMPATIBILITY
my $fax='+44 1793 566918'; # POLICE. RESTORE YOUR ORIGINAL
my $mobile='+44 7973 725120'; # TOKE.C AND BACK AWAY SLOWLY."
- References to:
-
"Redford, John" <John.Redford@fmr.com>
Pete Jordan <pjordan1@email.mot.com>
Stephen Zander <gibreel@pobox.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]