CtCmd

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

      for now.  When releases before release 7 are no longer supported, that
      code and all references to it may be removed.
1.04  Corrected compile warnings generated from aux_zuba.c and proc_table.h.
      License upgraded to CPL v1.0.  On Windows, CtCmd.dll links to ClearCase 
      dlls via symbol names instead of ordinal. So a patch of Clearcase
      will not necessarily require a rebuild of CtCmd. On Solaris, modified 
      aux_zuba.c to fix db_server:RPC failure introduced in ClearCase 2003.06 
      patch 12/13. Some clean up for HP-UX (HP-UX 10.20 no longer supported). 
1.03  Add vob.conf. Expand supported platforms to include Solaris
      2.9, Windows 5.1, HP-UX 11.11.  Modify signal behavior for
      ClearCase > 5.0. Added class method cmdstat() to return error
      status in scalar context.  
1.02  Modify ld in  SolarisInterposer.  Expand Windows $os test. 
      Add sections to README.  Add ChangeLog.
1.01  Fixed outfunc,errfunc.
1.00  Initial release to CPAN.

CtCmd.pm  view on Meta::CPAN


=head1 DESCRIPTION


B<I/O>

ClearCase::CtCmd::exec() takes either a string or a list  as an input argument, and, in array context, returns a three element Perl array as output.  


The first output element is a status bit containing 0 on success, 1 on failure.The second output element is a scalar string corresponding to stdout, if any.  The third element contains any error message corresponding to output on stderr.  
In scalar context, ClearCase::CtCmd::exec() returns output corresponding to either stdout or stderr, as appropriate.  ClearCase::CtCmd::cmdstat() will return 0 upon success, 1 upon failure of the last previous command.

ClearCase::CtCmd->new()  may be used to create an instance of ClearCase::CtCmd.  There are three possible construction variables:

ClearCase::CtCmd->new(outfunc=>0,errfunc=>0,debug=>1);

Setting outfunc or errfunc to zero disables the standard output and error handling functions.  Output goes to stdout or stderr. The size of the output array is reduced correspondingly.


B<Exit Status>

CtCmd.pm  view on Meta::CPAN



For commands that perform only one operation if the first element has any content, the second element will be empty, and vice-versa.

Upon the return of class method exec:

    ($a,$b,$c) = ClearCase::CtCmd::exec( some command );   

the first returned element $a contains the status of "some command":  0 upon success, 1 upon failure.  

In scalar context  ClearCase::CtCmd::cmdstat() will return 0 upon success, 1 upon failure of the last previous command.

Upon the return of instance method exec:

    $x = ClearCase::CtCmd-new; $x->exec( some command );
  
instance method status() is available: 

 $status = $x->status();

status() returns 0 upon success, 1 upon failure.

CtCmd.xs  view on Meta::CPAN

             RETVAL = view_set_current_view(NULL);
#else
             fprintf(stderr,"ERROR: unsetview() not available in Win32\n");
             RETVAL = 1;
#endif 
	}
  OUTPUT:
	RETVAL

int
cmdstat()
  CODE:
	RETVAL = status;
  OUTPUT:
	RETVAL

int
version()
  CODE:
	/*
	 * This method has the side effect of explicitly referencing



( run in 0.716 second using v1.01-cache-2.11-cpan-49f99fa48dc )