develooper Front page | perl.perl6.users | Postings from September 2018

Re: Appropriate last words

Thread Previous | Thread Next
From:
Stephen Wilcoxon
Date:
September 3, 2018 16:46
Subject:
Re: Appropriate last words
Message ID:
CAOhatNzLo_-JDUR=rk_M-PXZg2KNe5cpWHGhUS4r4T4=Bm8TyA@mail.gmail.com
Why the change in die handling between Perl 5 and 6?  Suppressing line
numbers with newline was very handy.  Alternatively, adding some sort of
directive would be more straight-forward (at least for Perl 5 users moving
to Perl 6).

On Mon, Sep 3, 2018 at 11:32 AM, Elizabeth Mattijsen <liz@dijkmat.nl> wrote:

> note “message”; exit
>
> > On 3 Sep 2018, at 18:03, Parrot Raiser <1parrota@gmail.com> wrote:
> >
> > perl6 -v
> > This is Rakudo Star version 2018.06 built on MoarVM version 2018.06
> > implementing Perl 6.c.
> >
> > In Perl 5:
> > die "Message";   outputs Message, followed by the program line number.
> > die "Message\n" outputs Message
> > without further ado.
> >
> > Perl 6 "die" produces line numbers regardless of the line ending.
> >
> > $ perl6 -e 'die "message";'
> > message
> >  in block <unit> at -e line 1
> >
> > $perl6 -e 'die "message\n";'
> > message
> >
> >  in block <unit> at -e line 1
> >
> > What's the Perl 6 equivalent for line number suppression?
> > https://docs.perl6.org/routine/die is silent on the topic.
>

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