class Gitalist::Git::Repository with Gitalist::Git::HasUtils {
# FIXME, use Types::Path::Class and coerce
use MooseX::Types::Common::String qw/NonEmptySimpleStr/;
+ use MooseX::Types::Path::Class qw/Dir/;
use MooseX::Types::Moose qw/Str Maybe Bool HashRef ArrayRef/;
- use Gitalist::Git::Types qw/SHA1 DateTime Dir/;
+ use Gitalist::Git::Types qw/SHA1/;
use Moose::Autobox;
use List::MoreUtils qw/any zip/;
- use aliased 'DateTime' => 'DT';
+ use DateTime;
use Encode qw/decode/;
use I18N::Langinfo qw/langinfo CODESET/;
use Gitalist::Git::Object::Blob;
use Gitalist::Git::Object::Tree;
use Gitalist::Git::Object::Commit;
use Gitalist::Git::Object::Tag;
-
- with 'Gitalist::Serializeable';
our $SHA1RE = qr/[0-9a-fA-F]{40}/;
lazy_build => 1,
);
- has last_change => ( isa => Maybe[DateTime],
+ has last_change => ( isa => Maybe['DateTime'],
is => 'ro',
lazy_build => 1,
);
lazy_build => 1 );
method BUILD {
- $self->$_() for qw/last_change owner description/; # Ensure to build early.
+ $self->$_() for qw/last_change owner description /; # Ensure to build early.
}
## Public methods
--sort=-committerdate --count=1 refs/heads
});
if (my ($epoch, $tz) = $output =~ /\s(\d+)\s+([+-]\d+)$/) {
- my $dt = DT->from_epoch(epoch => $epoch);
+ my $dt = DateTime->from_epoch(epoch => $epoch);
$dt->set_time_zone($tz);
$last_change = $dt;
}
#FIXME: That isn't the time I'm looking for..
if (my ($epoch, $tz) = $line =~ /\s(\d+)\s+([+-]\d+)$/) {
- my $dt = DT->from_epoch(epoch => $epoch);
+ my $dt = DateTime->from_epoch(epoch => $epoch);
$dt->set_time_zone($tz);
$ret[-1]->{last_change} = $dt;
}
#FIXME: That isn't the time I'm looking for..
if($epoch and $tz) {
- my $dt = DT->from_epoch(epoch => $epoch);
+ my $dt = DateTime->from_epoch(epoch => $epoch);
$dt->set_time_zone($tz);
$ret[-1]->{last_change} = $dt;
}