This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse require(foo()) correctly
authorFather Chrysostomos <sprout@cpan.org>
Sun, 7 Dec 2014 06:37:25 +0000 (22:37 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 7 Dec 2014 14:54:06 +0000 (06:54 -0800)
commit917a8f4f5219639a3448ee65e072ac87ec7a98bb
tree5b732428636f5a6307206ed4400730988e44e4a8
parentc7c39989c4f30bcf167b4401edec9a2dfcff6e2c
Deparse require(foo()) correctly

require(foo()) deparses as require foo().  But require’s parsing is
eccentric, and does not allow require foo(), because ‘foo’ is treated
as a bareword there, and ‘require WORD’ does not allow () fol-
lowing it.

The same problem happens with do-file, which is fixed also by this
commit, since it follows the same code path.
lib/B/Deparse.pm
lib/B/Deparse.t