Can any one help me to get some useful links for integrating perl script with ClearCase commands?

muralikrishna's picture
muralikrishna asked on December 8, 2010 - 4:52am | Replies (5).


Murali Krishna

5 Answers

Garry Short's picture

it'd be more helpful if you told us what you had in mind. At the most basic level, you write your perl script as normal and use qx/.../ to execute ClearCase commands.

You can also use %ENV to access certain ClearCase environment variables - e.g. $ENV{"CLEARCASE_USER"}.


viv_she's picture
viv_she replied on December 9, 2010 - 3:47am.

try using ccperl which is clearcase integrated perl.

Marc Girod's picture
Marc Girod replied on December 9, 2010 - 4:45am.

Don't. This is a Bad Ideea.

This is part of the installation, needed for ClearCase itself, but it is not really meant for customers' use.

it is closed: you won't be able to add modules to it, at the very least not such ones which would link some code
you don't manage it: it may go/change/get overwritten while installing in the next patch

Install your own perl, in a vob. Use the CPAN modules I told you, for portability, performance, flexibility...


muralikrishna's picture

I've tried below script.But it is not working

It is creating the Temp.txt with no outoput.The command shows in running mode at command prompt but never given any output to the Temp.txt
Pls help me in resolving the issue
@lstOffiles=`cleartool find . -all -ver "lbtype(lb_10) && !lbtype(lb_11)" -exec "cleartool describe -fmt \" %En \n \" %CLEARCASE_XPN% " `;

print " @lstOffiles \n";



Clearcase 5.0 Win
Perl 5.8.7

nosuagwu's picture
nosuagwu replied on December 16, 2010 - 6:48pm.

In the past, I did something as follows:
$cmd = qq~/usr/atria/bin/cleartool mkbl -com $VARIABLE -inc $SOME_VARIABLE~;

Replace with your specific commands. I didn't include any ClearCase library.

Good Luck.

CMCrossroads is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.