AWS-Lambda-Quick

 view release on metacpan or  search on metacpan

lib/AWS/Lambda/Quick/CreateZip.pm  view on Meta::CPAN

sub _add_path {
    my $self = shift;
    my $path = path(shift);

    if ( $path->is_absolute ) {
        die "Cannot add absolute path! $path";
    }
    my $abs_path = path( $self->_src_dir, $path );

    # silently ignore files that don't exist.  This allows you
    # to say put extra_files => [qw( lib )] in your file and not
    # worry if that file exists or not
    return unless -e $abs_path;

    $self->_zip->addFileOrDirectory(
        {
            name             => $abs_path->stringify,
            zipName          => $path->stringify,
            compressionLevel => COMPRESSION_DEFLATED,
        }
    );



( run in 0.678 second using v1.01-cache-2.11-cpan-b85c58fdc1d )