App-GitGot
view release on metacpan or search on metacpan
lib/App/GitGot/Repo.pm view on Meta::CPAN
package App::GitGot::Repo;
our $AUTHORITY = 'cpan:GENEHACK';
$App::GitGot::Repo::VERSION = '1.339';
# ABSTRACT: Base repository objects
use 5.014;
use List::Util qw/ uniq /;
use Types::Standard -types;
use App::GitGot::Types;
use Moo;
use namespace::autoclean;
has label => (
is => 'ro' ,
isa => Str ,
);
has name => (
is => 'ro',
isa => Str,
required => 1 ,
);
has number => (
is => 'ro',
isa => Int,
required => 1 ,
);
has path => (
is => 'ro',
isa => Str,
required => 1 ,
coerce => sub { ref $_[0] && $_[0]->isa('Path::Tiny') ? "$_[0]" : $_[0] } ,
);
has repo => (
is => 'ro',
isa => Str,
);
has tags => (
is => 'rw',
isa => Str,
);
has type => (
is => 'ro',
isa => Str,
required => 1 ,
);
sub BUILDARGS {
my( $class , $args ) = @_;
my $count = $args->{count} || 0;
die "Must provide entry" unless
my $entry = $args->{entry};
my $repo = $entry->{repo} //= '';
if ( ! defined $entry->{name} ) {
### FIXME this is unnecessarily Git-specific
( run in 0.980 second using v1.01-cache-2.11-cpan-39bf76dae61 )