Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deparse.pm: handle signatures under 'use v5.36'
Deparse.pm was checking for the equivalent of use feature 'signatures'; being in scope when deciding whether to deparse a sub using signature syntax. However, since 5.36.0, signatures can also be be enabled via use v5.36; but Deparse wasn't checking for this (the latter is stored in hints rather than in features). I haven't added a test as 'use v.5.36' itself currently doesn't deparse cleanly; however, this commit means that #use feature 'signatures'; use v5.36; sub f($x,$y) { return $x + $y; } used to deparse as: sub f { do { die sprintf("Too many arguments for subroutine at %s line %d.\n", (caller)[1, 2]) unless @_ <= 2; ... } but now correctly deparses as: sub f ($x, $y) { ... } Uncommenting the 'use feature' line instead worked both before and now. It was showing up as this failing: cd t; ./TEST -deparse ../lib/builtin.t
- Loading branch information