Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: a2001396f87340a0eaae11ba3dc9fbcaf00b072d https://github.com/Perl/perl5/commit/a2001396f87340a0eaae11ba3dc9fbcaf00b072d Author: Lukas Mai <lukasmai....@gmail.com> Date: 2024-07-02 (Tue, 02 Jul 2024)
Changed paths: M gv.c M lib/CORE.pod M op.c M pp_sys.c M t/op/coreamp.t M t/op/coresubs.t Log Message: ----------- add &CORE::chdir (properly) Previously, CORE::chdir was not "ampable", i.e. it could not be called through a coderef or with a sigil: &CORE::chdir($dir); The only thing allowed was to make a compile-time alias, whose calls would then be inlined to chdir again: BEGIN { *foo = \&CORE::chdir; } foo "."; # actually does chdir "." However, this was broken if the function call used parentheses, in which case chdir would always try to use its argument as a filehandle, not the name of a directory: BEGIN { *foo = \&CORE::chdir; } foo("."); # Triggers a warning: # chdir() on unopened filehandle . at file line 2. This commit fixes the problem and makes chdir fully "ampable", so &CORE::chdir() no longer triggers the "&CORE::chdir cannot be called directly" error. Commit: 521cc3f5d346a443029bf3a3f3dcae701063ab49 https://github.com/Perl/perl5/commit/521cc3f5d346a443029bf3a3f3dcae701063ab49 Author: Lukas Mai <lukasmai....@gmail.com> Date: 2024-07-02 (Tue, 02 Jul 2024) Changed paths: M pod/perldelta.pod Log Message: ----------- perldelta: add entry for &CORE::chdir Compare: https://github.com/Perl/perl5/compare/4c992435a2d3...521cc3f5d346 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications