tags:

views:

487

answers:

3

Hi, I want to use the SVN::Client cpan module to check out code from a repository.

But how to install and use this module? The documentation is kind of no existing.

I have tried install the Alien::SVN module both through cpan and build it myself. And it seems to install okay. No error messages, and when i go into cpan again and do the following it states that the Alien::SVN module is installed.

cpan> install Alien::SVN 
Alien::SVN is up to date. 

Here is my class that uses the SVN::Client:

use strict;
use warnings;
use Alien::SVN;
use SVN::Client;


sub new {
 my $self = {
  localpath => ''
 };
 bless($self);
 return $self;
}

sub update_repository{
 my ($self) = @_;

 my $svn = SVN::Client->new();
 return $svn->update($self->_getPath(), 'HEAD', 1);
}
sub _getPath{
 my ($self) = @_;
 return $self->{localpath};
}

So when i use a script to call the update repository method of this class i get the following error:

Can't locate SVN/Client.pm in @INC (@INC contains: /opt/STS /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /
usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /opt/STS/svn.pm line 7.

I have also tried changing use SVN::Client with use Alien::SVN but with no luck.

Does anyone have a working example of code, or a helpful tip to make the Alien::SVN / SVN::Client work?

A: 
cpan> install SVN::Client 
David Dorward
cpan> install SVN::ClientCPAN: Storable loaded okGoing to read /root/.cpan/Metadata Database was generated on Sun, 28 Mar 2010 16:57:52 GMTWarning: Cannot install SVN::Client, don't know what it is.Try the command i /SVN::Client/to find objects with matching identifiers.cpan>As you see it says that it cant find anything name SVN::Client
Joakim
Sorry for the messy layout, but in short. Cannot install SVN::Client, don't know what it is.
Joakim
+1  A: 

Install the package subversion-perl.

daxim
Or the Debian version: `libsvn-perl`
rjh
+1  A: 

As best I can tell, Alien::SVN and its constituent modules are no longer maintained. The subversion binary it compiles is extremely old (1.4, circa 2006). You may be better off piping to a pre-installed (and up-to-date) binary.

BipedalShark