Class-Lite

 view release on metacpan or  search on metacpan

t/162-undef.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Module::Empty;              # Truly empty module ships with Class::Lite

my $eval_err    ;
my $have        ;
my $want        ;
my $check       ;

note('The next check emits an error intentionally; this is ok.');

# Construction
eval "
    package Module::Empty;
    use Class::Lite ( 'attr1', undef, 'attr3' );
";

$eval_err       = $@;
$want           = qr/Invalid accessor name/;
$check          = 'Invalid accessor name (undef)';
like( $eval_err, $want, $check );
note($eval_err);



END {
    done_testing();
};
exit 0;



( run in 0.700 second using v1.01-cache-2.11-cpan-73692580452 )