Branch: refs/heads/yves/robust_inc_unsquash
  Home:   https://github.com/Perl/perl5
  Commit: f6562d02ed224ea64c11b5a95b095229312f416b
      
https://github.com/Perl/perl5/commit/f6562d02ed224ea64c11b5a95b095229312f416b
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M t/op/inccode.t
    M t/op/require_errors.t

  Log Message:
  -----------
  t/ - INC hardening tests

These tests are pretty much all marked TODO. In the
following patches we will remove the TODO as we fix
the bug or implement the feature.


  Commit: 2753e94c86d9f59e16e7aac53769fcc6cb4e661e
      
https://github.com/Perl/perl5/commit/2753e94c86d9f59e16e7aac53769fcc6cb4e661e
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  pp_ctl.c - rename vars to something more descriptive in require_file()

"i" and "ar" is a bit too minimal, and I will be refactoring
this code somewhat in following patches, so this preps it for
future changes.


  Commit: a823cc2c8be5da480174084619043030e7ac523e
      
https://github.com/Perl/perl5/commit/a823cc2c8be5da480174084619043030e7ac523e
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  pp_ctl.c - make ENTER debug data a bit more clear

We will have more than one INC hook in the future.


  Commit: 832cc305f92e143c26984fb3bb383342ff72f675
      
https://github.com/Perl/perl5/commit/832cc305f92e143c26984fb3bb383342ff72f675
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  pp_ctl.c - refetch @INC from *INC after hook

The original value may have been freed by the time the hook
returns, so we have to refetch it immediately after execution.

We also move the declaration into a more minimal scope.


  Commit: 0583a5d230ec6f9881a8d0404f2670994bbf5619
      
https://github.com/Perl/perl5/commit/0583a5d230ec6f9881a8d0404f2670994bbf5619
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - eval INC hooks, and rethrow errors with more useful message

When an INC hook blows up debugging what is going on can be
somewhat difficult. This adds some debugging data if the error
message does not seem to be customized.


  Commit: da28b5c725bd0e604944d0dd87adc20075ca16c3
      
https://github.com/Perl/perl5/commit/da28b5c725bd0e604944d0dd87adc20075ca16c3
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M Porting/Maintainers.pl
    M cpan/parent/lib/parent.pm
    M cpan/parent/t/parent.t

  Log Message:
  -----------
  cpan/parent - update to 0.239

This upgrade prepares us for modifying the error message from require.


  Commit: e17d52f196b3b6105cd739acbee77b0bb246eafb
      
https://github.com/Perl/perl5/commit/e17d52f196b3b6105cd739acbee77b0bb246eafb
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pod/perldelta.pod
    M pp_ctl.c
    M t/op/inccode.t
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - require_file: truthful errors and tests: ties are called once

We need to keep track of what we actually checked. We cannot simply
report the state of @INC at the end of the require, as it might have
changed, possibly several times during the require. This also accounts
for most "silly" stuff that might upset our internal assumptions, for
instance where a tie might report one value to the code doing the
directory check and another in the error message.

We had long standing tests to see that @INC tie elements where called
"once" but they actually tested they were called twice despite claiming
otherwise. This fixes all of those test so that a tied @INC entry is
called exactly once, and whatever it returned the first time is placed
in the error message.

This includes a change to the require error message, so that where it
once said "@INC contains:" it now says "@INC entries checked:". Note
this patch requires parent v0.239 to be available (which was done
in the previous commit).


  Commit: 94b3103df620300f56978bca6f0232632c0fecc0
      
https://github.com/Perl/perl5/commit/94b3103df620300f56978bca6f0232632c0fecc0
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - support $INC in require_file @INC hook

$INC is localized to be the C level index of the loop over the @INC
array. At the end of the hook its value is assigned back to the C level
loop iterator (inc_idx). This allows a hook to control where in the @INC
array the loop should continue, for instance -1 represents "reprocess
from the beginning" (and as a convenience so does undef). This can be
useful if the @INC array is modified by a hook. Normally we would just
"continue along", but this may or may not be the right thing to do, so we
let the user decide.


  Commit: 4d57de58eea394a931fae9af465196a96f777aa2
      
https://github.com/Perl/perl5/commit/4d57de58eea394a931fae9af465196a96f777aa2
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pod/perldelta.pod
    M pod/perldiag.pod
    M pp_ctl.c
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - handle objects in @INC a bit more gracefully

If an object doesn't have an INC hook then don't call it. Either simply
stringify the ref (think overloads), OR, if it is a blessed coderef,
then just execute it like it was an unblessed coderef.

Also handle when an object is passed as the first argument of the
array form of call. Previously this would throw an exception as the
first argument on the stack when we call_method() would not be
blessed. When this is the scenario we pass in the array as the third
argument to the method.


  Commit: 60f0b36b794a803ed5cac2cd292912c71a55c4b4
      
https://github.com/Perl/perl5/commit/60f0b36b794a803ed5cac2cd292912c71a55c4b4
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c
    M t/op/inccode.t
    M t/op/require_errors.t

  Log Message:
  -----------
  pp_ctl.c - add support for an INCDIR hook

This hook returns a list of directories for Perl to search.
If it returns an empty list it acts like a no-op (except for the
error message). The return from INCDIR is always stringified,
they are not treated the same as normal @INC entries so no hooks
returning hooks.


  Commit: 303d93c9e452c6e9bedc59500ec2d429aa918a08
      
https://github.com/Perl/perl5/commit/303d93c9e452c6e9bedc59500ec2d429aa918a08
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pp_ctl.c

  Log Message:
  -----------
  pp_ctl.c - move logic closer to where it is used

No sense doing something that has not effect.


  Commit: a2c3eaa9d2e755edeb8d2e32fbe42ddfb8a583e8
      
https://github.com/Perl/perl5/commit/a2c3eaa9d2e755edeb8d2e32fbe42ddfb8a583e8
  Author: Yves Orton <demer...@gmail.com>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M pod/perldelta.pod
    M pod/perlfunc.pod
    M pod/perlvar.pod

  Log Message:
  -----------
  pod/ - document $INC and INCDIR


Compare: https://github.com/Perl/perl5/compare/c3ef6974fd8c...a2c3eaa9d2e7

Reply via email to