lib/Git/Lint/Command.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 15 | 86.6 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 5 | 80.0 |
pod | 1 | 1 | 100.0 |
total | 18 | 21 | 85.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Git::Lint::Command; | ||||||
2 | |||||||
3 | 15 | 15 | 654 | use strict; | |||
15 | 31 | ||||||
15 | 367 | ||||||
4 | 15 | 15 | 62 | use warnings; | |||
15 | 28 | ||||||
15 | 297 | ||||||
5 | |||||||
6 | 15 | 15 | 6489 | use Capture::Tiny; | |||
15 | 300707 | ||||||
15 | 1847 | ||||||
7 | |||||||
8 | our $VERSION = '0.016'; | ||||||
9 | |||||||
10 | sub run { | ||||||
11 | 9 | 9 | 1 | 2517 | my $command = shift; | ||
12 | |||||||
13 | my ( $stdout, $stderr, $exit ) = Capture::Tiny::capture { | ||||||
14 | 0 | 0 | 0 | system( @{$command} ); | |||
0 | 0 | ||||||
15 | 9 | 41 | }; | ||||
16 | |||||||
17 | 9 | 54 | chomp($stderr); | ||||
18 | |||||||
19 | 9 | 28 | return ( $stdout, $stderr, $exit ); | ||||
20 | } | ||||||
21 | |||||||
22 | 1; | ||||||
23 | |||||||
24 | __END__ |