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

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

Thread Next
From:
Philip Prindeville
Date:
February 25, 2020 02:08
Subject:
"require" change of behavior in 5.16 or slightly before?
Message ID:
F61AEFD2-465A-4C95-8D80-730F45F1A592@redfish-solutions.com
Hi,

I have some build scripts that used to work in perl-5.10 and when we updated to perl-5.16 one in particular broke badly.

It does a:

require $config_file;

and two observations: (1) if $config_file is an absolute path, it no longer finds the file (I can see from a security standpoint that not being able to include arbitrary files anywhere on the system might be good…), and (2) if I change that too “… || die …” then the die doesn’t happen.

Were there changes along the way to how “require” behaves?  And what’s the workaround?

Thanks,

-Philip

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