Peter Scott wrote:
>
> Dave Rolsky wrote:
> >
> > Tony Olekshy wrote:
> > >
> > > die
> > >
> > > If argument isa "Exception", raise it as the new
> > > exception and die in the fashion that Perl 5 does.
> > >
> > > If argument is a string, wrap it in a new Error
> > > object, setting the message ivar to the given string,
> > > and raise that instead.
> >
> > Actually, the Perl5 die takes a list as its argument and
> > does join '', @_ to it to make the actual error message.
> >
> > > If argument is anything else, raise a run-time
> > > exception.
> >
> > So this probably shouldn't be the case.
>
> This sounds alright; there's something very self-defeating
> about raising a run-time exception from dying badly, if you
> see what I mean.
Yes! That's why v1 of RFC 88 didn't do that. Thanks, Dave.
> So the third case goes and the second one becomes, args are
> stringified and joined on '', etc.
It now reads:
If passed a single argument that isa "Exception", raise it as
the new exception and die in the fashion that Perl 5 does.
Otherwise, the arguments are stringified and joined with C<''>
(as in Perl 5), the resulting string is wrapped up in a new
Exception object (setting the message ivar to said string),
and the new Exception object is raised.
Yours, &c, Tony Olekshy.