Storage/Object.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Storage/Bucket.pm ↑ Summary Storage/Types.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Net::Google::Storage::Object;
4 {
5 2 $Net::Google::Storage::Object::VERSION = '0.1.2';
6 }
7  
8 # ABSTRACT: Interface for a Google Storage Object
9 # https://developers.google.com/storage/docs/json_api/v1/objects#resource
10  
11 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use Net::Google::Storage::Types;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15  
16 2 has id => (
17 is => 'ro',
18 isa => 'Str',
19 );
20  
21  
22 2 has selfLink => (
23 is => 'ro',
24 isa => 'Str'
25 );
26  
27  
28 2 has name => (
29 is => 'ro',
30 isa => 'Str',
31 );
32  
33  
34 2 has bucket => (
35 is => 'ro',
36 isa => 'Str',
37 );
38  
39  
40 2 has media => (
41 is => 'ro',
42 isa => 'HashRef',
43 );
44  
45  
46 2 has contentEncoding => (
47 is => 'ro',
48 isa => 'Str',
49 );
50  
51  
52 2 has contentDisposition => (
53 is => 'ro',
54 isa => 'Str',
55 );
56  
57  
58 2 has cacheControl => (
59 is => 'ro',
60 isa => 'Str',
61 );
62  
63  
64 2 has metadata => (
65 is => 'ro',
66 isa => 'HashRef[Str]',
67 );
68  
69  
70 2 has owner => (
71 is => 'ro',
72 isa => 'HashRef[Str]',
73 );
74  
75 2 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
76 2 __PACKAGE__->meta->make_immutable;
77  
78 2 1;
79  
80  
81 __END__
82 =pod
83  
84 =head1 NAME
85  
86 Net::Google::Storage::Object - Interface for a Google Storage Object
87  
88 =head1 VERSION
89  
90 version 0.1.2
91  
92 =head1 DESCRIPTION
93  
94 Object for storing the data of an object, slightly cut down from
95 L<https://developers.google.com/storage/docs/json_api/v1/objects#resource>.
96  
97 Generally Net::Google::Storage::Object objects are acquired from a
98 C<get_object>, C<list_objects>, or C<insert_object> call on a
99 L<Net::Google::Storage> object.
100  
101 =head1 ATTRIBUTES
102  
103 =head2 id
104  
105 The id of the object. Essentially the concatenation of the
106 L<bucket name|/bucket> and the L<object's name|/name>.
107  
108 =head2 selfLink
109  
110 The url of this object.
111  
112 =head2 name
113  
114 The name of the object within the bucket. B<This is what you want to adjust,
115 not the id.>
116  
117 =head2 bucket
118  
119 The name of the bucket the object resides within.
120  
121 =head2 media
122  
123 A hashref containing sundry information about the file itself - check out the
124 L<docs|https://developers.google.com/storage/docs/json_api/v1/objects#resource>.
125  
126 =head2 contentEncoding
127  
128 The content encoding of the object's data.
129  
130 =head2 contentDisposition
131  
132 The content disposition of the object's data.
133  
134 =head2 cacheControl
135  
136 Cache-Control directive for the object data.
137  
138 =head2 metadata
139  
140 Hashref containing user-defined metadata for the object.
141  
142 =head2 owner
143  
144 Hashref containing details for the object's owner.
145  
146 =head1 AUTHOR
147  
148 Glenn Fowler <cebjyre@cpan.org>
149  
150 =head1 COPYRIGHT AND LICENSE
151  
152 This software is copyright (c) 2012 by Glenn Fowler.
153  
154 This is free software; you can redistribute it and/or modify it under
155 the same terms as the Perl 5 programming language system itself.
156  
157 =cut
158  
« Storage/Bucket.pm ↑ Summary Storage/Types.pm »