23 Nov 2021 19:30:10 UTC
- Distribution: CPANPLUS
- Module version: 0.9914
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (3)
- Testers (664 / 4 / 0)
- KwaliteeBus factor: 1
- 71.49% Coverage
- License: perl_5
- Download (607.36KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:6 non-PAUSE users
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 use of
Compress::Zlib, or with binaries, like
The flow looks like this:
$cb->_extract Delegate to Archive::Extract
$dir = _extract( module => $modobj, [perl => '/path/to/perl', extractdir => '/path/to/extract/to', prefer_bin => BOOL, verbose => BOOL, force => BOOL] )
_extractwill take a module object and extract it to
extractdirif provided, or the default location which is obtained from your config.
The file name is obtained by looking at
$modobj->status->fetchand will be parsed to see if it's a tar or zip archive.
If it's a zip archive,
__unzipwill be called, otherwise
__untarwill be called. In the unlikely event the file is of neither format, an error will be thrown.
_extracttakes the following options:
CPANPLUS::Moduleobject. 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
Archive::Ziprespectively, or a binary solution like
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.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|