Unfuck last commit
[catagits/Gitalist.git] / lib / Gitalist / Git / HasUtils.pm
CommitLineData
7aa31dbb 1use MooseX::Declare;
38b9e5c8 2use Gitalist::Git::Util;
7aa31dbb 3
4role Gitalist::Git::HasUtils {
5
77970abc 6 method BUILD { }
7aa31dbb 7 after BUILD {
8 $self->meta->get_attribute('_util')->get_read_method_ref->($self); # Force value build.
9 }
10
11 has _util => ( isa => 'Gitalist::Git::Util',
12 lazy => 1,
13 is => 'bare',
14 builder => '_build_util',
15 handles => [ 'run_cmd',
16 'run_cmd_fh',
17 'run_cmd_list',
18 'get_gpp_object',
19 'gpp',
20 ],
21 );
22
23 sub _build_util { confess(shift() . " cannot build _util") }
24}
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