http://www.perlmonks.org?node_id=222952


in reply to $foo->bar = 14;

As shotgunefx pointed out, there's unfortunately no way to constrain the value assigned in anyway, neither before nor after the assignment. That renders the attribute nearly useless as far as I'm concerned.. a pity, since it'd be a lovely way to offer a bit of syntactical sugar. You could even support both the ->bar("baz") and the ->bar = "baz" style at the same time, but that's a moot consideration as is. :(

Makeshifts last the longest.