At 1:18 AM -0700 7/18/07, Michael G Schwern wrote:
>Craig A. Berry wrote:
> > However, it has so far proven beyond my Perl foo to
> > override CORE::GLOBAL::glob in terms of itself without either getting
>> infinite recursion or having whatever I do in
>> Module::Build::Platform::VMS ignored from within Module::Build::Base.
>
>FWIW, you avoid the infinite recursion by calling CORE::glob() instead of just
>glob().
>
>sub _fixed_glob {
> ...
> CORE::glob(...);
> ...
>}
>
>BEGIN {
> local *CORE::GLOBAL::glob = \&fixed_glob;
>}
Yeah, I did that (without the local) in one of the umpteen
permutations I tried. Just tried the following again in
Module::Build::Platform::VMS and the override doesn't exist as far as
Module::Build::Base::_detildefy is concerned. My current guess is
that it has something to do with the _interpose_module business in
Module::Build, which maybe doesn't set up the @ISA hierarchy until
run-time, or maybe it's just that Module::Build::Base is already
compiled before the platform stuff is invoked, so assigning to the
typeglob, even though it's in a BEGIN block, is too late. But I'm
speculating without really knowing what I'm talking about.
---------------
sub _vms_glob_override {
die "got here\n";
return CORE::glob(@_);
}
BEGIN {
*CORE::GLOBAL::glob = \&_vms_glob_override;
}
---------------
>
>> A number of the tests call is_deeply() to compare an array of
>> case-preserved filenames with another array of (by default)
>> non-case-preserved filenames. Obviously they don't match and the
>> tests fail. What's needed is a like_deeply() or similar where you
>> can pass a regex qualifier such as "?i:" to wrap around each of the
>> comparisons. So maybe I'll add that to MBTest one of these days.
>
>Would Test::Deep be useful here?
Looks like it might be.
--
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser