Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think it's called indirect syntax in contrast to CGI->new being the direct syntax. /me ponders that... Possibly. Though you might read new CGI as calling new from CGI . This would hold for new SomeClass, mostly because "new" is hardly a verb. It's an adjective, at best. Were new called create (construct, make, whatever) instead, as in $cgi = create CGI then we'd be right back at the kick $ball example. The grammatical object (CGI, SomeClass, $ball, $foo, et cetera) we're dealing with is something that is directly acted upon. Another example could be save $file, assuming that somehow $file->can('save') . Again, the grammatical object is a direct one. Contrast that with
In reply to Re^2: "Indirect" object syntax?
by muba
|
|