In principle, ClearCase Perl scripts are based on parsed outputs from system and cleartool commands.
The scripts are based on the cleartool command line, for example package CCCmd , and are used as:
use strict;
use Config;
require "path/to/CCCmd.pm";
sub Main
{
my $hostname = CCCmd::RunCmd('hostname');
chomp $hostname;
my $lsview = CCCmd::ClearToolNoError("lsview -l -pro -host $hostname");
return 1;
}
Main() || exit(1);
exit(0);
eg.
, Perl, , , cleartool fmt_ccase.
1/ , ( "" )
ct descr -fmt "%[activities]CXp" baseline:aBaseline.xyz@\ideapvob
( "," ).
:
2/ ( -)
ct descr -fmt "%u" activity:anActivityName@\ideapvob
3/ , . ( - " " )
: (./4),
4/ ( - "" )
:
ct descr -fmt "%[versions]CQp\n" activity:anActivityName@\ideapvob
5/ , , , .. ( " ", " ", " " " " )
, diff.
, ( ).