Re: [PATCH] Module::Build::Compat should support 'perl' as a prerequisite

2007-07-18 Thread Eric Wilhelm
# from David Golden
# on Wednesday 18 July 2007 09:05 pm:

> While EU::MM doesn't handle
>'perl' well (it issues a warning about a missing prerequisite), it
>does still write it into the Makefile PREREQ_PM line and into the
>META.yml.

Presumably, the compatibility Makefile.PL isn't used for ./Build dist, 
so the META.yml shouldn't be affected, right?

Are the downstream tools reading 'Makefile' and checking for 'perl' in 
the 'PREREQ_PM' line?

Is EU::MM assuming that perl is a module?  Should we just print a better 
warning from the Makefile.PL?

Also, it looks like we're a little light on checks in 
test_makefile_creation() in compat.t.

Thanks,
Eric
-- 
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---
http://scratchcomputing.com
---


Re: inching toward Module::Build-ability on VMS

2007-07-18 Thread Eric Wilhelm
# from Craig A. Berry
# on Wednesday 18 July 2007 10:01 pm:

>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.

You should be able to override _detildefy.  What am I missing?

The CORE::GLOBAL::glob override isn't going to work with the current 
code structure because Module/Build.pm says 'use Module::Build::Base'.

>The home-grown glob() implementation does not know what a tilde is,

Where is "the home-grown glob() implementation"?

--Eric
-- 
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---
http://scratchcomputing.com
---


more rt summary

2007-07-18 Thread Eric Wilhelm
no_index needs better docs
  resolved?
http://rt.cpan.org/Ticket/Display.html?id=19140

win32 File::Spec issue?
  resolved?
http://rt.cpan.org/Ticket/Display.html?id=18660
-- 
Like a lot of people, I was mathematically abused as a child.
--Paul Graham
---
http://scratchcomputing.com
---


Re: inching toward Module::Build-ability on VMS

2007-07-18 Thread Craig A. Berry
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


[PATCH] Module::Build::Compat should support 'perl' as a prerequisite

2007-07-18 Thread David Golden

Module::Build::Compat drops 'perl' from the list of prerequisites when
generating a Makefile.PL and/or Makefile.  While EU::MM doesn't handle
'perl' well (it issues a warning about a missing prerequisite), it
does still write it into the Makefile PREREQ_PM line and into the
META.yml.

By dropping that 'perl' prerequisite, Module::Build::Compat will in
some cases prevent CPAN.pm or other downstream tools like
CPAN::Reporter from detecting and reacting to an insufficient version
of Perl.  I believe better behavior is to pass the prerequisite along
rather than drop it.

The attached patch deletes the lines that skip 'perl' when assembling
prerequisites.

Regards,
David


Compat.patch
Description: Binary data


Re: inching toward Module::Build-ability on VMS

2007-07-18 Thread Michael G Schwern
demerphq wrote:
>> 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;
>> }
> 
> That local doesnt seem right. Are you sure about that?

You're right, no local.  But it does have to be in a BEGIN block.



Re: inching toward Module::Build-ability on VMS

2007-07-18 Thread demerphq

On 7/18/07, Michael G Schwern <[EMAIL PROTECTED]> wrote:

Craig A. Berry wrote:
> The home-grown glob() implementation does not know what a tilde is,
> and it returns VMS-format filespecs as absolute, not relative specs.
> Both of these are contrary to the assumptions of various parts of
> Module::Build and account for a number of test failures.  The easiest
> thing should be to override glob() and do a little pre-processing to
> expand tildes and post-processing to convert paths from absolute to
> relative.  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;
}


That local doesnt seem right. Are you sure about that?

--
perl -Mre=debug -e "/just|another|perl|hacker/"


Re: inching toward Module::Build-ability on VMS

2007-07-18 Thread Michael G Schwern
Craig A. Berry wrote:
> The home-grown glob() implementation does not know what a tilde is,
> and it returns VMS-format filespecs as absolute, not relative specs.
> Both of these are contrary to the assumptions of various parts of
> Module::Build and account for a number of test failures.  The easiest
> thing should be to override glob() and do a little pre-processing to
> expand tildes and post-processing to convert paths from absolute to
> relative.  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;
}


> 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?