login in wincvs thorugh shell or perl script

Hi ,

I am trying to write a script which does the wincvs login and does some checkout operations.

When i do it from command prompt with command

wincvs -d :pserver:username@server:/cvs/repository

it pops up a cvs window and i can do some operations there. I wanted to automate this through perl scripting or shell so neded some help in achieving it.
Just wanted to have some idea how i can do this.

Thanks

Hi,

I am trying to use the Cvs::Simple module of CPAN for perl interface but i am not able to do so here. I did not see a function where i need to put the server details and password. i am trying something like this but it does not work.
Please advise as how i can achieve this.

#!/usr/bin/perl
use Cvs::Simple;
use strict;
use warnings;

print "This program is using CVS module of CPAN...\n";
my($cvs) = Cvs::Simple->new('D:/CVS/temp',
        cvsroot => ':pserver:user@server:/cvs/repository',
        password => 'secret'
) or die "$!";
my $tag = "tagname";
my $module = "modulename";
print " Preparing to checkout $tag with $module\n";
$cvs->co($tag , $module);
print "Checkout is done. Please check the location of repository\n";

When i execute this program i got the error

Odd number of elements in hash assignment at C:/Perl/site/lib/Cvs/Simple.pm line 68.

How can we pass the login credentails and cvs server details to the new method.
Any idea or help will be a good help to me.

Thanks

---------- Post updated 05-20-10 at 06:35 AM ---------- Previous update was 05-19-10 at 08:56 AM ----------

Hi,

I am stuck in my code and not getting idea how to get it working.
If any suggestion or help is provide that will be helpful.

Thanks