in reply to Re: Perl Style: About error messges opening files
in thread Perl Style: About error messges opening files

Since about all pdie and perror do is tack "$!\n" to the die or warning message, I fail to agree.

Ah. Yeah. Good idea and point. :-) Might be worthy doing cluck/carp/croak/confess versions as well as the warn/die variants though.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Replies are listed 'Best First'.
Re: Perl Style: About error messges opening files
by Abigail-II (Bishop) on Apr 27, 2004 at 12:16 UTC
    Considering that perror and pdie don't print line numbers, carp and croak versions would not add anything. Also, I'd expect terseness when perror or pdie are used - not something I associate with the stack traces of cluck and confess. So, I don't see much added value in adding c-variants. But anyone could subclass it to PError::Carp, ;-).

    Abigail