File: DeleteBucket.pm

package info (click to toggle)
libnet-amazon-s3-perl 0.56-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 288 kB
  • sloc: perl: 2,264; makefile: 7
file content (43 lines) | stat: -rw-r--r-- 797 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package Net::Amazon::S3::Request::DeleteBucket;
use Moose 0.85;
extends 'Net::Amazon::S3::Request';

has 'bucket' => ( is => 'ro', isa => 'BucketName', required => 1 );

__PACKAGE__->meta->make_immutable;

sub http_request {
    my $self = shift;

    return Net::Amazon::S3::HTTPRequest->new(
        s3     => $self->s3,
        method => 'DELETE',
        path   => $self->bucket . '/',
    )->http_request;
}

1;

__END__

=head1 NAME

Net::Amazon::S3::Request::DeleteBucket - An internal class to delete a bucket

=head1 SYNOPSIS

  my $http_request = Net::Amazon::S3::Request::DeleteBucket->new(
    s3     => $s3,
    bucket => $bucket,
  )->http_request;

=head1 DESCRIPTION

This module deletes a bucket.

=head1 METHODS

=head2 http_request

This method returns a HTTP::Request object.