[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: A common base exception object for Perl - RFC
Nick Ing-Simmons wrote:
> SV *MakeObject(SV *raw, char *class)
> {
> SV *sv = newRV_noinc(raw); /* typically you don't want to inc refcount */
> HV *stash = gv_stashpv(class, TRUE); /* Find stash for class name */
> return sv_bless(sv, stash); /* bless raw into class via new RV */
> }
Thanks :)
> So we would need a new API which had extra "desired class" args.
Just so. The difficulty (in C) is generalising it; class is fine, but
how do you specify class-specific properties (assuming a programmer has
their own special Exception class that needs to be set up correctly)?
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."
- Follow-Ups from:
-
Nick Ing-Simmons <nik@tiuk.ti.com>
- References to:
-
"Redford, John" <John.Redford@fmr.com>
Pete Jordan <pjordan1@email.mot.com>
Stephen Zander <gibreel@pobox.com>
Pete Jordan <pjordan1@email.mot.com>
Nick Ing-Simmons <nick@ing-simmons.net>
Pete Jordan <pjordan1@email.mot.com>
Nick Ing-Simmons <nik@tiuk.ti.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]