develooper Front page | perl.perl5.changes | Postings from March 2023

[Perl/perl5] 13dc99: op.c: remove unneeded variable

From:
mauke via perl5-changes
Date:
March 30, 2023 08:34
Subject:
[Perl/perl5] 13dc99: op.c: remove unneeded variable
Message ID:
Perl/perl5/push/refs/heads/blead/d0e6e3-f0ccf3@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 13dc9989e55acd863329057e268c87a3f6f53aab
      https://github.com/Perl/perl5/commit/13dc9989e55acd863329057e268c87a3f6f53aab
  Author: Lukas Mai <lukasmai.403@gmail.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M op.c

  Log Message:
  -----------
  op.c: remove unneeded variable

`is_module_install_hack` is a local variable in S_process_special_blocks
that is only used to silently treat INIT blocks (in package
Module::Install::DSL) as BEGIN blocks. But instead of setting the
variable and jumping before the `if` block that checks the variable, we
can just jump into the block and get rid of the variable.


  Commit: f0ccf3d06975afe2d1bcdc52912395058983b8e6
      https://github.com/Perl/perl5/commit/f0ccf3d06975afe2d1bcdc52912395058983b8e6
  Author: Lukas Mai <lukasmai.403@gmail.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M op.c

  Log Message:
  -----------
  op.c: use consistent spacing around = and ,

... in the Module::Install::DSL hack. Also, move `{` up to the same line
as the controlling `if` for consistency with the rest of the file.


Compare: https://github.com/Perl/perl5/compare/d0e6e389eee3...f0ccf3d06975



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About