X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FApp%2FRgit%2FRepository.pm;h=0ca5e940a692537d136620776cecb421e42461bb;hb=a35a1fae17b8e75696ef1e5474aaa99222594a6a;hp=15cf6274b74a1641b610ac5bfd123897b81302fd;hpb=93a8a5d44eba331fd4359c2763834290c0e9a70a;p=perl%2Fmodules%2Frgit.git diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index 15cf627..0ca5e94 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -3,8 +3,8 @@ package App::Rgit::Repository; use strict; use warnings; -use Cwd qw/cwd abs_path/; -use File::Spec::Functions qw/canonpath catdir splitdir abs2rel file_name_is_absolute/; +use Cwd qw/cwd abs_path/; +use File::Spec::Functions qw/canonpath catdir splitdir abs2rel/; use POSIX qw/WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG SIGINT SIGQUIT/; BEGIN { @@ -48,9 +48,12 @@ sub new { my %args = @_; my $dir = $args{dir}; - $dir = abs_path $dir if defined $dir and not file_name_is_absolute $dir; - $dir = cwd unless defined $dir; - $dir = canonpath $dir; + if (defined $dir) { + $dir = abs_path $dir; + } else { + $dir = cwd; + } + $dir = canonpath $dir; my ($repo, $bare, $name, $work); if ($args{fake}) { @@ -211,7 +214,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2008-2009 Vincent Pit, all rights reserved. +Copyright 2008,2009,2010 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.