NAME

Unzip::Passwd - Unzip files with password.

DESCRIPTION

Extreamly simple Unzip abstraction using the unzip program( MUST BE INSTALLED )

WARNING: This is Alpha version.

VERSION

Version 0.0.15

SYNOPSIS

 #Instance
 my $obj = Unzip::Passwd->new( filename => 'myfile.zip',
 					destiny => 'some/path/to/file/unziped',
					passwd => 'somebetterpassword',
							);
 #unzip ...
 $obj->unzip;

 #done!

METHODS

new

This is the constructor

unzip

Do the job, basicly. But first invokes the analyze method, to have certain the zip file is fine. 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.

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 exec unzip method. Never exec this method directly.

show_errors

Makes the obvious. Show errors. Don't receives anything. Returns the error messages( arrayref ).

ACCESSORS

filename

Name/Path of file that will be 'unziped'

passwd

string with the password

destiny

filepath to extract file

errors

stack(array) of errors

DEPENDECIES

unzip program MUST be installed!

AUTHOR

Andre Carneiro, <andregarciacarneiro at gmail.com>

NOTES FOR THIS VERSION

More tests implement.

Moose implementation was removed because Moose have so much dependencies that aggregates unnecessary complexity to this very simple module( keep shit simple ).

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:

TODO

All other features from unzip ( Linux version ). :D

Aggregates some log module.

Finish the tests... :(

Create a better way to treat exceptions...

ACKNOWLEDGEMENTS

Luis Campos de Carvalho(Champs) - for inspiration.

LICENSE AND COPYRIGHT

Copyright 2010 Andre Carneiro.

This program is released under the following license: Artistic2