in reply to Re: Having trouble running query in ClearCase OLE interface
in thread Having trouble running query in ClearCase OLE interface

I am trying to translate from a VBS program.
Following is the applicable portion of that script.
Dim objCC Set objCC = Wscript.CreateObject("ClearCase.Application") Dim COQuery Set COQuery = objCC.CreateCheckedOutFileQuery Dim CheckedOutFiles Set CheckedOutFiles = COQuery.Apply Dim strMsg strMsg = CheckedOutFiles.Count & " files are checked out: "
This works well in VBS.
The COQuery.Apply works like an SQL command in that it populates
a table with a list of checked-out files. The count command returns
a list of those checked-out files.
The really unfortunate thing is that all of ClearCase's examples
are in VBS. I would MUCH rather be using Perl.

Replies are listed 'Best First'.
Re^3: Having trouble running query in ClearCase OLE interface
by chargrill (Parson) on Nov 02, 2006 at 19:55 UTC

    I would bet that COQuery->Apply returns an array, which you then assign to a standard perl array, @CheckedOutFiles.

    Perl arrays don't have a method called "Count".

    You probably want:

    print scalar @CheckedOutFiles . " files are checked out: "


    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
      That's an excellent idea.
      I'll give it a try.
Re^3: Having trouble running query in ClearCase OLE interface
by fenLisesi (Priest) on Nov 03, 2006 at 15:07 UTC
    Did you try the $CheckedOutFiles idea above?