#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
{ package My;
sub new { bless {}, shift }
}
use Function::Parameters;
use Types::Standard qw( InstanceOf );
fun validate(InstanceOf['My'] $m) { # <- Fails :-(
say "object:", $m;
}
my $m = 'My'->new;
validate($m);
####
In fun validate: missing type name after '[' at 1.pl line 13.
####
fun validate((InstanceOf['My']) $m) { # <- Works :-)
# ~ ~