This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
DosGlob: Don’t use the magic 2nd arg to glob
authorFather Chrysostomos <sprout@cpan.org>
Fri, 27 Apr 2012 23:48:36 +0000 (16:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 10 Dec 2012 02:47:19 +0000 (18:47 -0800)
commitc619428f3ddd8b400d932fe55a95dbfa57c647fc
treeacb7c49f88ef67423ceada493aa9b7da0fe8d547
parente2f137a79fc59f85f7323ded9b1a55055d085f0c
DosGlob: Don’t use the magic 2nd arg to glob

Use the address of the glob op instead.

This argument is going away, because it is undocumented, unused on
CPAN outside of the core, and may get in the way of allowing glob() to
be overridden properly.

Another reason is that File::DosGlob leaks memory, because a glob op
freed before iteration has finished will leave File::DosGlob still
holding on to the remainder of the list of files.  The easiest way to
fix that will involve using an op address instead of a special index,
so there will be no reason to keep it.
MANIFEST
ext/File-DosGlob/DosGlob.xs [new file with mode: 0644]
ext/File-DosGlob/lib/File/DosGlob.pm
ext/File-DosGlob/t/DosGlob.t