CPANPLUS::Internals::Extract - internals for archive extraction
- ### for source files ###
- $self->_gunzip( file => 'foo.gz', output => 'blah.txt' );
- ### for modules/packages ###
- $dir = $self->_extract( module => $modobj,
- extractdir => '/some/where' );
CPANPLUS::Internals::Extract extracts compressed files for CPANPLUS.
It can do this by either a pure perl solution (preferred) with the
, or with binaries, like
The flow looks like this:
- Delegate to Archive::Extract
will take a module object and extract it to
if provided, or the default location which is obtained from your
The file name is obtained by looking at
and will be parsed to see if it's a tar or zip archive.
If it's a zip archive,
will be called, otherwise
will be called. In the unlikely event the file is of neither format,
an error will be thrown.
takes the following options:
object. This is required.
The directory to extract the archive to. By default this looks something like: /CPANPLUS_BASE/PERL_VERSION/BUILD/MODULE_NAME
A flag indicating whether you prefer a pure perl solution, ie
respectively, or a binary solution
The path to the perl executable to use for any perl calls. Also used to determine the build version directory for extraction.
Specifies whether to be verbose or not. Defaults to your corresponding config entry.
Specifies whether to force the extraction or not. Defaults to your corresponding config entry.
All other options are passed on verbatim to
Returns the directory the file was extracted to on success and false on failure.