Revert "Merge remote branch 't0m/json' into json"
[catagits/Gitalist.git] / lib / Gitalist / Git / HasUtils.pm
index 4f16b5a..7d133ac 100644 (file)
@@ -1,32 +1,38 @@
 use MooseX::Declare;
-use Gitalist::Git::Util;
 
 role Gitalist::Git::HasUtils {
+    use Gitalist::Git::Util;
 
-    mehod BUILD { }
+    method BUILD {}
     after BUILD {
-        $self->meta->get_attribute('_util')->get_read_method_ref->($self); # Force value build.
+        # Force value build
+        $self->meta->get_attribute('_util')->get_read_method_ref->($self);
     }
 
-    has _util => ( isa => 'Gitalist::Git::Util',
-                   lazy => 1,
-                   is => 'bare',
-                   builder => '_build_util',
-                   handles => [ 'run_cmd',
-                                'run_cmd_fh',
-                                'run_cmd_list',
-                                'get_gpp_object',
-                                'gpp',
-                            ],
-               );
-
-    sub _build_util { confess(shift() . " cannot build _util") }
+    has _util => (
+        isa => 'Gitalist::Git::Util',
+        lazy => 1,
+        is => 'bare',
+        builder => '_build_util',
+        handles => [qw/
+            run_cmd
+            run_cmd_fh
+            run_cmd_list
+            get_gpp_object
+            gpp
+        /],
+    );
+    method _build_util { confess(shift() . " cannot build _util") }
 }
 
 1;
 
 __END__
 
+=head1 NAME
+
+Gitalist::Git::HasUtils - Role for classes with an instance of Gitalist::Git::Util
+
 =head1 AUTHORS
 
 See L<Gitalist> for authors.