Re: Fwd: installed Mail::SPF reports/compares version incorrectly in cpan

2007-05-02 Thread Eric Wilhelm
# from Julian Mehnle
# on Wednesday 02 May 2007 03:34 pm:

Is it likely that M::B 0.26's META.yml generator is badly interacting
with version.pm-based version numbers (`use version; our $VERSION =
qv('2.004');`) and CPAN is really expecting a version.pm-style version
number in META.yml (here: v2.004)?  Or why would CPAN report a
 version mismatch for v2.004 vs 2.004000?

That seems possible.  I don't have a 0.26 M::B handy, but your Mail::SPF 
META.yml has version: 2.00400 and mine are like version: v0.11.3.

The question may be whether the version.pm / CPAN code is honoring your 
VERSION line correctly.  Though, possibly that should be qv('v2.4.0').  
John?

If it compares a version object to your META.yml, I think that should be 
good.  If it is doing a string-compare, I think all bets are off.

Aside:  I'm thinking of changing most of my modules to simply say 
$VERSION = v0.1.2 just to see what breaks.  So far, it appears to be 
less of an issue than the version.pm docs imply, at least back to 5.6.2 
or so.

--Eric
-- 
Issues of control, repair, improvement, cost, or just plain
understandability all come down strongly in favor of open source
solutions to complex problems of any sort.
--Robert G. Brown
---
http://scratchcomputing.com
---


Re: _detildefy -- r9408

2007-05-02 Thread Ken Williams


On Apr 28, 2007, at 9:52 PM, Eric Wilhelm wrote:


Maybe we do s/(~\w*(?:/|$))// and then glob($1) . $_ ?  Does that
cover everything?  (Well, everything except the backslash duality  
issue

on windows.)  If people want ~my user name is cool/ to work, I don't
think I can bring myself to think about it.


Yeah, me neither.

Here's what MakeMaker does, which is pretty close to that, but  
doesn't invoke the shell:


if ($value =~ m/^~(\w+)?/) { # tilde with optional username
$value =~ s [^~(\w*)]
[$1 ?
 ((getpwnam($1))[7] || ~$1) :
 (getpwuid($))[7]
 ]ex;
}

We should probably just steal it out of there, since at least then  
we'll be consistent.


Can you verify that on Windows (getpwuid $)[7] returns $ENV{HOME} if  
set?  Or at least something reasonable?  Or even if it doesn't, we  
can easily just override _detildefy in the Windows subclass.


 -Ken