NAME
PAR::Repository::Zip - ZIP file handling routines for PAR::Repository
SYNOPSIS
use PAR::Repository;
...
DESCRIPTION
This module is for internal use only. It contains code for dealing with ZIP files. .par archives are ZIP files.
All methods here-in are considered private methods (note the underscores in the names). Do not use outside of PAR::Repository. (Of course, you are free to copy the source code (see license).)
EXPORT
None.
METHODS
Following is a list of class and instance methods. (Instance methods until otherwise mentioned.)
There is no PAR::Repository::Zip
object. PAR::Repository inherits from this class.
_unzip_dist_to_path
First argument should be path and file name of a .par distribution. Second argument may be a path to unzip the distribution to. (Defaults to current working directory.)
Unzips the distribution to the specified directory and returns the directory name. Returns the empty list on failure.
_unzip_dist_to_tmpdir
Creates a temporary directory and extracts a .par/zip archive into it. First argument must be the archive file and (optional) second argument may be a sub directory (of the temp dir) to extract into. This is mainly intended for blib/
sub directories.
_zip_file
Callable as class or instance method.
Zips the file given as first argument to the file given as second argument. If there is no second argument, zips to "file1.zip" where "file1" was the first argument.
Returns the name of the zip file.
Optional third argument is the zip member name to use.
_unzip_file
Unzips the file given as first argument to the file given as second argument. If a third argument is used, the zip member of that name is extracted. If the zip member name is omitted, it is set to the target file name.
Returns the name of the unzipped file.
AUTHOR
Steffen Müller, <smueller@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2006-2009 by Steffen Müller
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.