PAR::Repository::Client::HTTP - PAR repository via HTTP
my $client = PAR::Repository::Client->new(
uri => 'http:///foo/repository',
http_timeout => 20, # but default is 180s
This module implements repository accesses via HTTP.
If you create a new PAR::Repository::Client object and pass it an uri parameter which starts with http:// or https://, it will create an object of this class. It inherits from PAR::Repository::Client.
The repository is accessed using LWP::Simple.
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.
Fetches a dbm (index) file from the repository and returns the name of the temporary local file or the empty list on failure.
An error message is available via the error() method in case of failure.
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. foo_bar.dbm.zip) 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 http://par.perl.org.
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.
The repository access is done via LWP::Simple.
Steffen Mueller, <email@example.com>
Copyright (C) 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.
To install PAR::Repository::Client, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.