PAR::Repository::Client::Local - PAR repo. on the local file system


  use PAR::Repository::Client;
  my $client = PAR::Repository::Client->new(
    uri => 'file:///foo/repository',


This module implements repository accesses on the local filesystem.

If you create a new PAR::Repository::Client object and pass it an uri parameter which starts with file:// or just a path, it will create an object of this class. It inherits from PAR::Repository::Client.




Following is a list of class and instance methods. (Instance methods until otherwise mentioned.)


Fetches a .par distribution from the repository and stores it locally. Returns the name of the local file or the empty list on failure.

First argument must be the distribution name to fetch.


Makes sure the repository is valid. Returns the empty list if that is not so and a true value if the repository is valid.

Checks that the repository version is compatible.

The error message is available as $client-error()> on failure.


Returns a YAML::Tiny object representing the repository meta information.

This is a private method.


This is a private method.

Fetches a dbm (index) file from the repository and returns the name of the local file or the empty list on failure.

An error message is available via the error() method in case of failure.


This is a private method.

If the repository has a checksums file (new feature of PAR::Repository 0.15), this method returns a hash associating the DBM file names (e.g. with their MD5 hashes (base 64).

This method always queries the repository and never caches the information locally. That's the whole point of having the checksums.

In case the repository does not have checksums, this method returns the empty list, so check the return value! The error message (see the error() method) will be "Repository does not support checksums" in that case.


This private method is called by the new() method of PAR::Repository::Client. It is used to initialize the client object and new() passes it a hash ref to its arguments.

Should return a true value on success.


This module is part of the PAR::Repository::Client distribution.

This module is directly related to the PAR project. You need to have basic familiarity with it. The PAR homepage is at

See PAR, PAR::Dist, PAR::Repository, etc.

PAR::Repository implements the server side creation and manipulation of PAR repositories.

PAR::WebStart is doing something similar but is otherwise unrelated.


Steffen Mueller, <>


Copyright 2006-2009 by Steffen Mueller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.