tags:

views:

88

answers:

1

Hi, the code below prints nothing. Please help me out in the same.

use Cvs;

my $obj = new Cvs cvsroot => ":pserver:pramodh\@129.227.152.22:/data/cvs" or die $Cvs::ERROR;

$obj->checkout(package) || print "ERROR";
my @modules = $obj->module_list();
print "@modules";

If I work on the command line it works fine with these commands:

[root@localhost pramodh]# CVSROOT=:pserver:[email protected]:/data/cvs
[root@localhost pramodh]# export CVSROOT
[root@localhost pramodh]# cvs login
Logging in to :pserver:[email protected]:2401/data/cvs
CVS password:pramodh
[root@localhost pramodh]# cvs co packages
cvs checkout: Updating packages
+1  A: 

You need to quote your checkout argument.

$obj->checkout('packages') or warn "ERROR";

package is a reserved keyword in Perl.

Zaid
its "packages", its not working with me.
Pramodh