Revert "Merge remote branch 't0m/json' into json"
[catagits/Gitalist.git] / lib / Gitalist / Git / HasUtils.pm
CommitLineData
76fa4452 1use MooseX::Declare;
2
3role Gitalist::Git::HasUtils {
4 use Gitalist::Git::Util;
5
6 method BUILD {}
7 after BUILD {
8 # Force value build
9 $self->meta->get_attribute('_util')->get_read_method_ref->($self);
10 }
11
12 has _util => (
13 isa => 'Gitalist::Git::Util',
14 lazy => 1,
15 is => 'bare',
16 builder => '_build_util',
17 handles => [qw/
18 run_cmd
19 run_cmd_fh
20 run_cmd_list
21 get_gpp_object
22 gpp
23 /],
24 );
25 method _build_util { confess(shift() . " cannot build _util") }
26}
38b9e5c8 27
281;
775e96e0 29
30__END__
31
271f6b46 32=head1 NAME
33
34Gitalist::Git::HasUtils - Role for classes with an instance of Gitalist::Git::Util
35
775e96e0 36=head1 AUTHORS
37
38See L<Gitalist> for authors.
39
40=head1 LICENSE
41
42See L<Gitalist> for the license.
43
44=cut