On Fri Sep 20 23:45:43 2013, Hugmeir wrote: > On Sat, Sep 21, 2013 at 12:19 AM, Father Chrysostomos via RT < > perlbug-followup@perl.org> wrote: > > > On Fri Sep 20 18:05:44 2013, Hugmeir wrote: > > > meanwhile, the paradigm in the few CPAN modules that do this[*] is > "grab > > > the interpreter during BOOT, use that to construct a fake > > CLONE_PARAMS, and > > > then replace the interpreter with aTHX after MY_CXT_CLONE" > > > Which, on top of the previous patch, becomes this: > > > > It has often bothered me that a CLONE method in pure Perl can’t > really > > access both interpreters. I have known about CLONE for a long time, > but > > had never actually seen it used (or bothered looking). > > > > If what you have below works, and works reliably (it looks fine to > me), > > I say go for it. > > > > I wasn't sure if the new tests would work on VMS -- most of the other > glob > test files have special cases for it -- so I've pushed this as > smoke-me/hugmeir/dup_glob_state Your test assumes that the output will be sorted, but does not even use File::Glob on VMS. I don’t know whether the default glob on VMS produces sorted output, and whether you need to sort it. Alternatively, just ‘use File::Glob "glob"’ explicitly, and bypass the globhook mechanism (which VMS ignores) altogether. Concerning your earlier Test::More comment and my response, I don’t think we actually need to load threads before Test::More if all the tests will be coming from one thread. > > > > > > Is it possible to write this in a way that is binary-compatible (for > > 5.16 and 5.18)? I believe the fact that the struct below is not > public > > makes it safe to change it like that. > > > > This I do not know. > (I can't find a definition of binary (in)?compatibility perlpolicy or > other > pods) As long as XS extensions compiled with 5.18.[10] continue to work with 5.18.2, we preserve binary compatibility. With File::Glob, I don’t think we actually have anything to worry about. I just brought it up because I want to backport the change. BTW, we should probably add a new API to perl for registering clone handlers. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=119897Thread Previous | Thread Next