develooper Front page | perl.perl5.porters | Postings from February 2020

Re: "require" change of behavior in 5.16 or slightly before?

Thread Previous | Thread Next
From:
Tony Cook
Date:
February 19, 2020 23:33
Subject:
Re: "require" change of behavior in 5.16 or slightly before?
Message ID:
20200219233305.GI18378@mars.tony.develop-help.com
On Wed, Feb 19, 2020 at 06:23:32PM -0500, Dan Book wrote:
> (2) The die will never happen for two reasons. || has higher precedence
> than require, so it will be parsed as "require($config_file || die)" and
> hopefully your $config_file is not "0". Also, require only ever returns
> true or dies.

tony@mars:.../git/perl$ perl -MO=Deparse,-p -e 'require $foo || die'
((require $foo) or die);
-e syntax OK

Tony

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