[Perl/perl5] 53a6f7: `README.riscos`: Improve the document

2024-04-03 Thread Elvin Aslanov via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 53a6f7aabfcbe508ff3e0835802d2dd2be935816
  
https://github.com/Perl/perl5/commit/53a6f7aabfcbe508ff3e0835802d2dd2be935816
  Author: Elvin Aslanov 
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
M README.riscos

  Log Message:
  ---
  `README.riscos`: Improve the document

Enhance formatting, minor clarifications etc

https://perldoc.perl.org/perlriscos



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications


[Perl/perl5] f38f76: h2ph: define all symbols at runtime

2024-04-03 Thread mauke via perl5-changes
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: f38f760a1129030b3a4c5c3a3fe49409a65327c2
  
https://github.com/Perl/perl5/commit/f38f760a1129030b3a4c5c3a3fe49409a65327c2
  Author: Lukas Mai 
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
M t/lib/h2ph.h
M t/lib/h2ph.pht
M utils/h2ph.PL

  Log Message:
  ---
  h2ph: define all symbols at runtime

Preprocessor directives must be processed strictly in order. `#if` and
`#ifdef` directives can inspect the current state of defined symbols.
That's why it is wrong to translate `#define FOO() ...` to `sub foo() {
... }` since subroutine definitions are processed unconditionally at
compile time, before the rest of the code starts running.

In particular,

unless(defined()) {
sub FOO () { eval q(1); }
}

is equivalent to

# at compile time:
sub FOO () { eval q(1); }

# ... later, at runtime:
unless(defined()) {
# does nothing
}

Fix this case by always wrapping subroutines in eval '...', which moves
the symbol definition to runtime, regardless of what $t (our indentation
state) is.

Similarly, generate `_h2ph_pre.ph` without the functionally useless
`unless (defined &...) { }` blocks. We don't need runtime definitions
(via eval) here because nothing in this file depends on the dynamic
state of macro definitions. It's all `#define`s, no `#if`s.

Fixes #22109.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications