ClearCase::Argv

ClearCase-specific subclass of Argv
Download

ClearCase::Argv Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David Boyce
  • Publisher web site:
  • http://search.cpan.org/~dsb/

ClearCase::Argv Tags


ClearCase::Argv Description

ClearCase-specific subclass of Argv ClearCase::Argv is a ClearCase-specific Perl subclass of Argv.SYNOPSIS # OO interface use ClearCase::Argv; ClearCase::Argv->dbglevel(1); # Note how the command, flags, and arguments are separated ... my $describe = ClearCase::Argv->new('desc', , "."); # Run the basic "ct describe" command. $describe->system; # Run it with with stderr turned off. $describe->stderr(0)->system; # Run it without the flags. $describe->system('-'); # Run it through a pipe. $describe->pipecb(sub { print shift; return 1; }); $describe->pipe; # Create label type XX iff it doesn't exist ClearCase::Argv->new(qw(mklbtype -nc XX)) if ClearCase::Argv->new(qw(lstype lbtype:XX))->stderr(0)->qx; # Functional interface use ClearCase::Argv qw(ctsystem ctexec ctqx ctpipe); ctsystem('pwv'); my @lsco = ctqx(qw(lsco -avobs -s)); # Similar to OO example: create label type XX iff it doesn't exist ctsystem(qw(mklbtype XX)) if !ctqx({stderr=>0}, "lstype lbtype:XX"); ClearCase::Argv->pipecb(sub { print "GOT: " . shift() . " "; 1 }); ctpipe({autochomp => 1},'lsview', );There are more examples in the ./examples subdir that comes with this module. Also, the test script is designed as a demo and benchmark and is a good source for cut-and-paste code.ClearCase::Argv is a subclass of Argv for use with ClearCase. It exists to provide an abstraction layer over the cleartool command-line interface. A program written to this API can be told to send commands to ClearCase via the standard technique of executing cleartool or via the ClearCase::CtCmd module or via a pipe to cleartool (aka IPC mode) by flipping a switch.To that end it provides a couple of special methods ctcmd and ipc. The ctcmd method can be used to cause cleartool commands to be run in the current process space using ClearCase::CtCmd. Similarly, ipc will send commands to a cleartool co-process. See the documentation of these modules for details on what they do, and see ALTERNATE EXECUTION INTERFACES below for how to invoke them. Sample scripts are packaged with ClearCase::Argv in ./examples. Requirements: · Perl


ClearCase::Argv Related Software