| blib/lib/Enbld/Deployed.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 6 | 12 | 50.0 |
| branch | 0 | 2 | 0.0 |
| condition | n/a | ||
| subroutine | 2 | 4 | 50.0 |
| pod | 0 | 2 | 0.0 |
| total | 8 | 20 | 40.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Enbld::Deployed; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 6 | use strict; | |||
| 2 | 4 | ||||||
| 2 | 71 | ||||||
| 4 | 2 | 2 | 7 | use warnings; | |||
| 2 | 3 | ||||||
| 2 | 181 | ||||||
| 5 | |||||||
| 6 | our %deployed; | ||||||
| 7 | |||||||
| 8 | sub add { | ||||||
| 9 | 0 | 0 | 0 | my ( $pkg, $config ) = @_; | |||
| 10 | |||||||
| 11 | 0 | $deployed{$config->name} = $config; | |||||
| 12 | |||||||
| 13 | 0 | return $config->name; | |||||
| 14 | } | ||||||
| 15 | |||||||
| 16 | sub is_deployed { | ||||||
| 17 | 0 | 0 | 0 | my ( $pkg, $name ) = @_; | |||
| 18 | |||||||
| 19 | 0 | 0 | return $deployed{$name} if ( $deployed{$name} ); | ||||
| 20 | |||||||
| 21 | 0 | return; | |||||
| 22 | } | ||||||
| 23 | |||||||
| 24 | 1; |