sub validate_max_size {
my $val = shift;
! defined $val || $val > 0;
}
.
.
# Then later ...
.
my @data :Field :Type( \&package::validate_max_size );
####
# Failed test 'Valid max_size: undef'
# at (eval 4) line 43.
# died: OIO::Code error: Problem with type check routine for initializer 'max_size' for class 'IBM::Common::Collection
# Error: Argument "undef" isn't numeric in numeric gt (>)
# Package: main
# File: t/IBM-Common-Collection.t
# Line: 68
####
perl -Mstrict -we 'sub f {my $v = shift; ! defined $v || $v > 0}; f(undef)'