Author: kwilliams
Date: Sat Jun 7 20:56:28 2008
New Revision: 11391
Modified:
Module-Build/trunk/Changes
Module-Build/trunk/lib/Module/Build/Platform/Unix.pm
Log:
Allow dashes in Unix usernames
Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes (original)
+++ Module-Build/trunk/Changes Sat Jun 7 20:56:28 2008
@@ -1,5 +1,8 @@
Revision history for Perl extension Module::Build.
+ - Most Unix platforms seem to allow hyphens in usernames, so we honor
+ this in our de-tilde-fying methods now. [Spotted by s-murata]
+
- If there are multiple assignments to the $VERSION variable in
someone's module and this generates warnings, tell the user what
line number the problem is at.
Modified: Module-Build/trunk/lib/Module/Build/Platform/Unix.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Platform/Unix.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Platform/Unix.pm Sat Jun 7
20:56:28 2008
@@ -44,7 +44,7 @@
sub _detildefy {
my ($self, $value) = @_;
- $value =~ s[^~(\w*)(?=/|$)] # tilde with optional username
+ $value =~ s[^~(\w[-\w]*)?(?=/|$)] # tilde with optional username
[$1 ?
((getpwnam $1)[7] || "~$1") :
(getpwuid $>)[7]