ACME2/X/Empty.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 SCAR 17.9
CC
2
Cov
0%
new
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.0
1 package Net::ACME2::X::Empty;
2  
3 use strict;
4 use warnings;
5  
6 use parent qw( Net::ACME2::X::Generic );
7  
8 sub new {
9 my ( $class, $args_hr ) = @_;
10  
11 my $str;
12  
13 if ( defined $args_hr->{'name'} && length $args_hr->{'name'} ) {
14 $str = "“$args_hr->{'name'}” cannot be empty!";
15 }
16 else {
17 $str = 'This value cannot be empty!';
18 }
19  
20 return $class->SUPER::new($str, $args_hr);
21 }
22  
23 1;