File Coverage

blib/lib/Group/Git/Cmd/Build.pm
Criterion Covered Total %
statement 21 30 70.0
branch 0 4 0.0
condition n/a
subroutine 7 10 70.0
pod 2 2 100.0
total 30 46 65.2


line stmt bran cond sub pod time code
1             package Group::Git::Cmd::Build;
2              
3             # Created on: 2013-05-20 09:03:03
4             # Create by: dev
5             # $Id$
6             # $Revision$, $HeadURL$, $Date$
7             # $Revision$, $Source$, $Date$
8              
9 1     1   645 use strict;
  1         1  
  1         22  
10 1     1   3 use version;
  1         2  
  1         3  
11 1     1   38 use Moose::Role;
  1         1  
  1         6  
12 1     1   2971 use Carp;
  1         2  
  1         43  
13 1     1   3 use Data::Dumper qw/Dumper/;
  1         1  
  1         34  
14 1     1   3 use English qw/ -no_match_vars /;
  1         1  
  1         4  
15 1     1   258 use File::chdir;
  1         1  
  1         187  
16              
17             our $VERSION = version->new('0.0.3');
18              
19 0     0 1   sub build { shift->_builder( 'builder', 'Build.PL', @_ ) }
20 0     0 1   sub mvn { shift->_builder( 'mvn' , 'pom.xml' , @_ ) }
21             sub _builder {
22 0     0     my ($self, $cmd, $test, $name) = @_;
23              
24 0 0         return unless -d $name;
25 0 0         return unless -f $test;
26              
27 0           local $CWD = $name;
28              
29 0           $cmd .= ' ' . join ' ', map { $self->shell_quote } @ARGV;
  0            
30              
31 0           return `$cmd`;
32             }
33              
34             1;
35              
36             __END__
37              
38             =head1 NAME
39              
40             Group::Git::Cmd::Build - Builds repositories
41              
42             =head1 VERSION
43              
44             This documentation refers to Group::Git::Cmd::Build version 0.0.3
45              
46              
47             =head1 SYNOPSIS
48              
49             use Group::Git::Cmd::Build;
50              
51             # Brief but working code example(s) here showing the most common usage(s)
52             # This section will be as far as many users bother reading, so make it as
53             # educational and exemplary as possible.
54              
55              
56             =head1 DESCRIPTION
57              
58             =head1 SUBROUTINES/METHODS
59              
60             =head2 C<build <$name>
61              
62             Builds a repository if it contains a Build.PL or Makefile.PL file
63              
64             =head2 C<mvn <$name>
65              
66             Builds a repository if it contains a pom.xml file
67              
68             =head1 DESCRIPTION
69              
70             =head1 SUBROUTINES/METHODS
71              
72             =head2 C<tag ($name)>
73              
74             Does the work of finding tags
75              
76             =head1 DIAGNOSTICS
77              
78             =head1 CONFIGURATION AND ENVIRONMENT
79              
80             =head1 DEPENDENCIES
81              
82             =head1 INCOMPATIBILITIES
83              
84             =head1 BUGS AND LIMITATIONS
85              
86             There are no known bugs in this module.
87              
88             Please report problems to Ivan Wills (ivan.wills@gmail.com).
89              
90             Patches are welcome.
91              
92             =head1 AUTHOR
93              
94             Ivan Wills - (ivan.wills@gmail.com)
95              
96             =head1 LICENSE AND COPYRIGHT
97              
98             Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077).
99             All rights reserved.
100              
101             This module is free software; you can redistribute it and/or modify it under
102             the same terms as Perl itself. See L<perlartistic>. This program is
103             distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
104             without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
105             PARTICULAR PURPOSE.
106              
107             =cut