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


in reply to Indirect Object Syntax

> my @bounds = new GD::Image->stringFT($colour, "Image/outline.ttf", 90, 0.18, 0, 0, $watermark_text);

it's never a good idea to mix two syntax variations

use my @bounds = GD::Image->new->stringFT($colour, "Image/outline.ttf", 90, 0.18, 0, 0, $watermark_text);

Perl wanted to provide maximum flexibility by allowing method syntax from two different language families, this leads to very annoying error messages.

is this

foo bar

?

IMHO indirect object syntax is a good candidate for deprecation.

It could be that only new , print and say will survive.

Avoiding is best, and mixing is a no-no!

update

More in Ch15 of PBP

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery