This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add &CORE::glob
authorFather Chrysostomos <sprout@cpan.org>
Mon, 30 Apr 2012 00:58:44 +0000 (17:58 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 29 May 2012 16:36:25 +0000 (09:36 -0700)
commit498a02d80cfca0073bd62ad27aac793a0d5e785c
tree0aac2d5fac55bb450e91c9f489c95abf672a940f
parent2a90c7c66a488294c5c30860c8d5794bb9264c30
Add &CORE::glob

I added a special case for OP_GLOB to pp_coreargs, since glob does not
have the u flag in regen/opcodes; hence PL_opargs[opnum] & OA_DEFGV is
false, even though glob does imply $_.

Adding the flag to regen/opcodes is not so simple, as the code in
ck_fun that adds the DEFSV op does not account for list ops, but
leaves op_last unchanged.

Changing ck_fun to account requires adding more code than this special
case in pp_coreargs.

OPf_SPECIAL indicates that glob was called with the CORE:: prefix.
gv.c
op.c
pp.c
t/op/coreamp.t
t/op/coresubs.t