cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indirect object vs. arrow syntax in manual (was Re: Problems with Depend


From: Alex Jacques
Subject: Indirect object vs. arrow syntax in manual (was Re: Problems with Depends...)
Date: Fri, 22 Dec 2000 17:13:21 -0500

The problem cited below about the indirect object syntax brings to mind
a question that I've been kicking around for a while. I've been toying
with some improvements to the manual (such as better NT documentation -
no promises though as the ol' schedule is pretty full). The indirect
object syntax "METHOD OBJECT LIST" for invoking methods is pretty
consistently used in    the manual instead of the arrow syntax
"OBJECT->METHOD(LIST)". There are exceptions in the descriptions of the
clone and copy methods, and the section on writing dependency scanners
(the last complete with a note on how the author thought that the
indirect object syntax should work, but he couldn't get it to). However,
as evidenced below, I think that the arrow syntax is much simpler,
clearer, and more widely used (it's a lot like C++ and Java). Die hard
Perl Monks might argue about the value of getting two syntaxes for the
price of one, but I don't think one wants to confuse the non-Perl-Monk
manual reader. Even the Camel book (3rd ed.) notes the numerous
syntactical ambiguities of the indirect object method, and suggests that
if you have to choose one the arrow syntax is probably a better bet. The
perlobj manpage (5.005_03 distro) goes even further: "The infix arrow
notation using -> doesn't suffer from either of these disturbing
ambiguities, so we recommend you use it exclusively."

My suggestion: use the -> syntax exclusively in the manual. Any
feedback?


-----Original Message-----
From: address@hidden [mailto:address@hidden
Behalf Of Johan Holmberg
Sent: Friday, December 22, 2000 4:22 AM
Cc: Cons-Discuss (E-mail)
Subject: Re: Problems with Depends...



On Thu, 21 Dec 2000, Eric Brown wrote:
>
> so I want to make sure that HomeServ.dll gets built before the files
that
> include it.  One file in particular is ABDlg.cpp.
>
> I've tried
>
> Depends $local, "ABDlg.cpp", "$BIN/HomeServ.dll";
> and
> Depends $local, "ABDlg.obj",  "$BIN/HomeServ.dll";
> and
> Depends $local, "inc/PcService.h", "$BIN/HomeServ.dll";
> all to no avail.
>

I don't think you should have a ","  between $local and the next
argument. The "indirect object syntax" is used in all
cons-documentation. I'm surprised that your synax work, but maybe
Perl is "smart" enough to figure out what you mean :-)

Without knowing anything about #import and your problem in detail,
I would guess that

        Depends $local "ABDlg.obj",  "$BIN/HomeServ.dll";

would be what you want. This would tell cons to rebuild "ABDlg.obj"
whenever the DLL changes (you must of course also have another rule
telling what command to use, but I assume that you already have
that).

> Running cons -pa never seems to result in any dlls appearing in the
> dependency lists.
>

"-pa" only prints the targets, and the commands used to produce
those targets. I think you should use the "-d" option to see
dependencies:

            $ cons -d .
            $ cons -d -pa .





reply via email to

[Prev in Thread] Current Thread [Next in Thread]