| 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; |