http://qs321.pair.com?node_id=160451


in reply to Re: Griping about Typing
in thread Griping about Typing

You can already document your intent
my $bork = Bork->new(); my Chef $x = $bork->bork->bork;
Only trouble is (gee whizz!) I'm dreaming my life away.

Ahem, back at the plot, the trouble is that perl will silently ignore your careful predeclaration and assign to $x even if ! $bork->bork->bork->isa('Chef'), which is a shame. use strict 'declarations' anyone? Implementation left as an exercise to the interested reader obviously. Me and C don't get on.