| blib/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 | 16 | 16 | 801 | use strict; | |||
| 16 | 31 | ||||||
| 16 | 395 | ||||||
| 4 | 16 | 16 | 70 | use warnings; | |||
| 16 | 23 | ||||||
| 16 | 347 | ||||||
| 5 | |||||||
| 6 | 16 | 16 | 7158 | use Capture::Tiny; | |||
| 16 | 321534 | ||||||
| 16 | 1938 | ||||||
| 7 | |||||||
| 8 | our $VERSION = '0.015'; | ||||||
| 9 | |||||||
| 10 | sub run { | ||||||
| 11 | 9 | 9 | 1 | 2582 | my $command = shift; | ||
| 12 | |||||||
| 13 | my ( $stdout, $stderr, $exit ) = Capture::Tiny::capture { | ||||||
| 14 | 0 | 0 | 0 | system( @{$command} ); | |||
| 0 | 0 | ||||||
| 15 | 9 | 33 | }; | ||||
| 16 | |||||||
| 17 | 9 | 55 | chomp($stderr); | ||||
| 18 | |||||||
| 19 | 9 | 25 | return ( $stdout, $stderr, $exit ); | ||||
| 20 | } | ||||||
| 21 | |||||||
| 22 | 1; | ||||||
| 23 | |||||||
| 24 | __END__ |