Created
January 20, 2010 16:25
-
-
Save broquaint/281973 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Gitalist::Git::Repository { | |
... | |
use if $^O ne 'MSWin32', 'I18N::Langinfo', => qw/langinfo CODESET/; | |
BEGIN { | |
no strict 'subs'; | |
*__owner = defined &langinfo | |
? method { map { decode(langinfo(CODESET), $_) } (getpwuid $self->path->stat->uid)[6,0] } | |
: method { return qw/OwnEr GroUp/ } | |
; | |
} | |
... | |
method _build_owner { | |
my ($gecos, $name) = $self->__owner; | |
$gecos =~ s/,+$//; | |
return length($gecos) ? $gecos : $name; | |
} | |
... | |
} | |
# Can't locate object method "__owner" via package "Gitalist::Git::Repository" at | |
C:\dev\code\perl\Gitalist\blib\lib/Gitalist/Git/Repository.pm line 255. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment