I don't see any problem with calling getbounds() where you do. The only problems I see are that you've got '=>' instead of '->' and that there's a space between that and the name of the method.
IOW, change $buildable=> getbounds() to $buildable->getbounds().
You might also want to change from (my $width, my $height) to my ( $width, $height ) on that line. The syntax you're using gets the job done, but it's not the way you'll see most people writing that. |