[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-module-build
Subject:    Re: OS Xy detilidification for less normal usernames
From:       "Joshua ben Jore" <twists () gmail ! com>
Date:       2008-07-15 6:12:19
Message-ID: dc5c751d0807142312h7df6f5ebw7e43b57d48e7c615 () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jul 14, 2008 at 8:22 PM, Ken Williams <kenahoo@gmail.com> wrote:
> On Mon, Jul 14, 2008 at 3:51 PM, Joshua ben Jore <twists@gmail.com> wrote:
>> I tried building Perl 5.10.0 on work's new OS X laptop. My username is
>> approximately jjore@example.com complete with @ and . characters. My
>> home directory is /Users/jjore@example.com The current code and tests
>> assume that only characters in the \w class are valid in usernames. If
>> email addresses appear to be valid usernames, the code Module::Build
>> uses on my platform should perhaps use a regexp like m<^~[^/]*(?=/|$)>
>> instead of m<^~\w*(?=/|$)>. In my case, the characters available for
>> my username are probably restricted from the full [^/] and certainly
>> exclude : but probably other things like \0 and anything non-ASCII.
>
> The fact that one's username can contain weird characters doesn't mean
> a shell will expand it, though.  I (and someone else in an M::B RT
> ticket) did some digging in some sources, and apparently expandable
> usernames are something like
>
>  m/\w[-\w]*/
>
> That's what the M::B::Platform::Unix::_detildefy() method accepts now, in SVN.

Ok, that would still fail tests when run on my machine with its
configuration. Perhaps the tests should be skipping detildification
when the username doesn't match /^\w[-\w]*\z/. Are you sure the
leading character is really a \w? A username of '0' is sufficient?
That's just a number which should parse differently. Usually
identifiers use a different class [[:alpha:]_] for the first
character.

Josh
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic