brian42miller has asked for the wisdom of the Perl Monks concerning the following question:
I am having difficulty getting the Cvs module to work and I assume that it is due to my ineptitude. Are there any examples of how to use this module?
Here is the code that I am having difficulty with, maybe it is some simple that I am missing and if someone could point it out I would be grateful!
I am assuming that the 'working' directory option is where the working copy of the repository has been previously checked out to.
The cvsroot value is the same as what is in the checked out CVS/Root file.
I have added a '\' before the @ however that does not seem to make a difference.
There already exists a checked out version of the common/scripts/release/regress.pl file.
Thanks
Brian Miller
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------use strict; use Cvs; my $cvs = Cvs->new('workdir' => '/projects/millerb/SR/vhdl' ,'cvsroot'=>':pserver:millerb@172.20.175.10:/hwcvs' ,'password' => '********' ) or die $Cvs::ERROR; print "CVS ERROR ($Cvs::ERROR)\n"; print "CVS OBJ $cvs\n"; print "-----GETTING STATUS----\n"; my $status_obj = $cvs->status('common/scripts/release/regress.pl'); print "-----COMPLETED STATUS----\n"; print "status_obj $status_obj\n"; my $status = $status_obj->status(); print "$status_obj Status $status\n";
Results
-----------------------------------------------------------------------------------
millerite:release$ perl cvs_test.pl CVS ERROR () CVS OBJ Cvs=HASH(0x1490d78) -----GETTING STATUS---- -----COMPLETED STATUS---- status_obj Cvs::Result::Base=HASH(0x176d010) Can't locate object method "status" via package "Cvs::Result::Base" at + cvs_test.pl line 61. millerite:release$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CVS Module examples
by wjw (Priest) on Nov 17, 2014 at 23:34 UTC | |
by brian42miller (Sexton) on Nov 18, 2014 at 15:00 UTC | |
by brian42miller (Sexton) on Nov 18, 2014 at 20:01 UTC | |
by toolic (Bishop) on Nov 19, 2014 at 14:49 UTC | |
by wjw (Priest) on Nov 18, 2014 at 20:32 UTC | |
by marto (Cardinal) on Nov 19, 2014 at 14:55 UTC | |
by brian42miller (Sexton) on Nov 19, 2014 at 14:30 UTC |