But the name is inappropriate: it checks the type of the return value of the subroutine, rather than wanted value. "Strongly typed" implies compile-time checks and a degree of type safety, so it would disallow things like

$len = @list;

I tried to show a nice counterexample,

sub foo :TYPE('ARRAY') {

return (1..10);

}

$bar = foo();

Well, this doesn't work, but not for the reason you would expect. Type 'ARRAY' is an array reference, not an array. It's documented, but it's not intuitive.

It would be nice to differentiate between arrays/lists and references to them.