NAME
Unzip::Passwd - Unzip files with password.
DESCRIPTION
Extreamly simple Unzip abstraction using the unzip program( MUST BE INSTALLED )
WARNING: This is a Alpha module.
VERSION
Version 0.0.13
SYNOPSIS
#Instance
my $obj = Unzip::Passwd->new( filename => 'myfile.zip',
destiny => 'some/path/to/file/unziped',
passwd => 'somebetterpassword',
);
#unzip ...
$obj->unzip;
#done!
METHODS
unzip
Do the job, basicly. But first invokes the analyze method, to have certain the destination directory exists.
If analyze returns 1, then unzip will try to open the zip file. No parameters, will return 1 if it's all ok. Otherwise, will return 0 and throw an exception.
ATTENTION: update options is activated by default. That means the files will be overwriten if exists in the same directory defined in 'destiny' attribute.
list_files
This try to obtain a list of files from zipfile in $self->filename. If succeded, returns an arrayref with the filelist. Otherwise returns an arrayref empty.
analyze
Analyzes possible file and directory problems( permissions and non-existing directories etc ). Returns 1 if all it's ok! Otherwise returns 0. Receives the files list( arrayref ) as parameter.
exec_unzip
This is a internal method. You should invoke unzip method, not this! Never invoke this method directly.
ATTENTION: update options is activated by default. That means the files will be overwriten if exists in the directory defined in 'destiny' attribute.
show_errors
Makes the obvious. Show errors. Don't receives nothing as parameter. Returns the error messages( arrayref ).
DEPENDECIES
Moose - that's it!
AUTHOR
Andre Carneiro, <andregarciacarneiro at gmail.com>
NOTES FOR THIS VERSION
Default -u( update file, or create if necessary ) option activated. This avoids the interactive mode from unzip.
More tests were implemented
BUGS
Please report any bugs or feature requests to bug-unzip-passwd at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Unzip-Passwd. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
This module was tested JUST ON LINUX. DON'T HAVE SUPPORT IN WINDOWS YET. MAYBE LATER...
You can find documentation for this module with the perldoc command.
perldoc Unzip::Passwd
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
TODO
All other features from unzip ( Linux version ). :D
Aggregates some log module.
Finish the tests... :(
Create a better way to treat exceptions...
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2010 Andre Carneiro.
This program is released under the following license: Artistic2