develooper Front page | perl.perl5.porters | Postings from November 2021

Re: New function suggestion: eval-or-die

Thread Previous | Thread Next
Paul "LeoNerd" Evans
November 19, 2021 13:42
Re: New function suggestion: eval-or-die
Message ID:
On Mon, 13 Sep 2021 10:03:02 +0100
"Paul \"LeoNerd\" Evans" <> wrote:

> I feel it would be nice to provide a function of this behaviour in the
> new "builtins" space at some point. Needs a better name though -
> suggestions welcome.

Latest thoughts from PSC chats are that this probably wants to be
called `compile`, and should act similarish to

  my $subref = compile $source;

  my $subref = eval "sub { $source }" // die $@;

Though for now we'll park the idea while we actually get some progress
on the builtins namespace. Perhaps someone will come back to this after

Paul "LeoNerd" Evans      |  |

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