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

Re: design questions

Thread Previous | Thread Next
Aristotle Pagaltzis
June 3, 2008 09:55
Re: design questions
Message ID:
* Roland Giersig <> [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.

Aristotle Pagaltzis // <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About