This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Split the guts of pp_require into two static fns
authorDavid Mitchell <davem@iabyn.com>
Sat, 19 Mar 2016 15:16:50 +0000 (15:16 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 10 May 2016 09:32:55 +0000 (10:32 +0100)
commit5fb413889777319544fb826f2cd3d8e78459b0a8
tree72d47af825c625a75bcfc03c6e9d20f998a641c6
parentda7cf1cc7cedc01f35ceb6724e8260c3b0ee0d12
Split the guts of pp_require into two static fns

S_require_version() and S_require_file() do the 'require 5.010001'
and 'require Foo::Bar' actions respectively.

This makes it clear that pp_require is effectively 2 disjoint functions,
and that all the local variables previously declared at the start of
pp_require actually belong exclusively to the file loading functionality.

This is based on a patch by Nicholas from 4 years ago, except that
I did the split from scratch since pp_require has been touched quite a
bit since then.

This commit splits it in such a way that the diff is kept as small as
possible. The next commit will re-indent.
pp_ctl.c