The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Backup::Zip - A Zip Role for classes using Moose

VERSION

version 0.02

SYNOPSIS

        package CanZipThings;
        use Moose;
        with 'Backup::Zip';

        sub files_to_zip() {
            return (
                '/etc/passwd',
                '/etc/bashrc',
            );
        }

        package main;
        use CanZipThings;

        my $canzip = CanZipThings->new;
        $canzip->make_zip("/tmp/somezip.zip");

DESCRIPTION

This is a Role and it provides a zip function to the consumer class.

files_to_zip()

Backup::Zip is a Role and it depends on the files_to_zip() method which it expects the consumer class to provide. This method will be used by make_zip() in order to get an array of the files it will zip so the return value should be a list with filepaths.

make_zip($zip)

This method uses Archive::Zip to zip your files and stores them in the path indicated by $zip. If you provide no arguments , it will 'confess' with an error message. You will also receive warnings for all the files that don't exist.

unzip($what,$where) - unimplemented!

This method will unzip the files found at the path $what to the path $where.

BUGS

If this module has any bugs please report them to rt.cpan.org or my email.

Also if you have any suggestions on the code you are welcome to drop me an e-mail.

AUTHOR

Stefan Petrea, <stefan.petrea at gmail.com>