The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use Test::More;
use strict; use warnings FATAL => 'all';

use List::Objects::WithUtils 'hash';
my $hr = hash(foo => 1, baz => undef);
ok $hr->defined('foo'), 'defined ok';
ok !$hr->defined('baz'), 'negative defined ok';
ok !$hr->defined('bar'), 'nonexistant defined ok';

done_testing;