develooper Front page | perl.perl5.porters | Postings from June 2008

Re: autodie.pm design questions

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
June 3, 2008 09:55
Subject:
Re: autodie.pm design questions
Message ID:
20080603165523.GT22427@klangraum.plasmasturm.org
* Roland Giersig <rgiersig@cpan.org> [2008-06-03 18:40]:
> Paul Fenwick wrote:
>> * Fatal will more or less remain as it is, although there is
>> some risk of breakage since it will be throwing proper
>> exception objects, which stringify into much nicer looking
>> error messages.
>
> Isn't Fatal going to be deprecated and replaced by autodie? I
> think this would be the right way: keep Fatal for legacy
> reasons but strongly push autodie as the 'better Fatal'. This
> makes for a clean transition: old code can continue to use
> Fatal, new code should be written with autodie. When
> refactoring code, either keep Fatal or completely switch to
> autodie.

I agree with this, actually. Better not to improve Fatal at all;
just leave it around as obsolete legacy for backcompat. Oh yeah,
someone might even have code that parses Fatal’s messages, which
would be broken by any changes. (No, it’s not a very strong
argument. But I agree with Roland that there is little point for
people to newly employ Fatal in the future.)

The only change to Fatal should be to add the hooks necessary to
detect when someone is combining it and autodie in an erroneous
way. Other than that, legacy mode all the way.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About