| 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 | 704 | use strict; | |||
| 15 | 39 | ||||||
| 15 | 400 | ||||||
| 4 | 15 | 15 | 66 | use warnings; | |||
| 15 | 28 | ||||||
| 15 | 339 | ||||||
| 5 | |||||||
| 6 | 15 | 15 | 6795 | use Capture::Tiny; | |||
| 15 | 301459 | ||||||
| 15 | 1853 | ||||||
| 7 | |||||||
| 8 | our $VERSION = '0.014'; | ||||||
| 9 | |||||||
| 10 | sub run { | ||||||
| 11 | 9 | 9 | 1 | 2630 | my $command = shift; | ||
| 12 | |||||||
| 13 | my ( $stdout, $stderr, $exit ) = Capture::Tiny::capture { | ||||||
| 14 | 0 | 0 | 0 | system( @{$command} ); | |||
| 0 | 0 | ||||||
| 15 | 9 | 36 | }; | ||||
| 16 | |||||||
| 17 | 9 | 56 | chomp($stderr); | ||||
| 18 | |||||||
| 19 | 9 | 26 | return ( $stdout, $stderr, $exit ); | ||||
| 20 | } | ||||||
| 21 | |||||||
| 22 | 1; | ||||||
| 23 | |||||||
| 24 | __END__ |