in reply to Why 'die LIST'?

It takes a list so the following works die "error with object ", $object->name(), " while processing bar(", $object->state(), ")\n"; I wish that the Carp family (croak, confess, etc) also took a list instead of .'ing everything. Ugly, ugly, ugly.

Replies are listed 'Best First'.
Re: Re: Why 'die LIST'?
by John M. Dlugosz (Monsignor) on Jul 25, 2001 at 00:22 UTC
    Hmm, that would be a bug, then, since the documented behavior is "they act like die() or warn()...".

    Hmm, and it works for me:

    perl -MCarp -e "carp ('hello', 'world', qq(\n))";
    Looking at the code, it says, my $error = join '', @_; so it certainly is intending to work that way.

    —John

Re: Re: Why 'die LIST'?
by rrwo (Friar) on Jul 27, 2001 at 06:23 UTC

    They do. Look at the source of Carp.pm.