Small cleanups
[catagits/Gitalist.git] / lib / Gitalist / Git / HasUtils.pm
CommitLineData
38b9e5c8 1package Gitalist::Git::HasUtils;
2use Moose::Role;
3use Gitalist::Git::Util;
4use namespace::autoclean;
5
6sub BUILD {}
7after BUILD => sub {
8 my $self = shift;
50d45f00 9 $self->meta->get_attribute('_util')->get_read_method_ref->($self); # Force value build.
38b9e5c8 10};
11
12has _util => ( isa => 'Gitalist::Git::Util',
50d45f00 13 lazy => 1,
14 is => 'bare',
15 builder => '_build_util',
defb0050 16 handles => [ 'run_cmd',
aa7f1f92 17 'run_cmd_fh',
defb0050 18 'run_cmd_list',
19 'get_gpp_object',
20 'gpp',
21 ],
38b9e5c8 22 );
23
50d45f00 24sub _build_util { confess(shift() . " cannot build _util") }
38b9e5c8 25
261;
775e96e0 27
28__END__
29
30=head1 AUTHORS
31
32See L<Gitalist> for authors.
33
34=head1 LICENSE
35
36See L<Gitalist> for the license.
37
38=cut