line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Database::Object::Blob; |
2
|
|
|
|
|
|
|
$Git::Database::Object::Blob::VERSION = '0.012'; |
3
|
8
|
|
|
8
|
|
495066
|
use Moo; |
|
8
|
|
|
|
|
53138
|
|
|
8
|
|
|
|
|
36
|
|
4
|
8
|
|
|
8
|
|
5469
|
use namespace::clean; |
|
8
|
|
|
|
|
20719
|
|
|
8
|
|
|
|
|
62
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
with 'Git::Database::Role::Object'; |
7
|
|
|
|
|
|
|
|
8
|
478
|
|
|
478
|
1
|
108361
|
sub kind { 'blob' } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub BUILD { |
11
|
450
|
|
|
450
|
0
|
535118
|
my ($self) = @_; |
12
|
450
|
100
|
100
|
|
|
12998
|
die "One of 'digest' or 'content' is required" |
13
|
|
|
|
|
|
|
if !$self->has_digest && !$self->has_content; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=for Pod::Coverage |
23
|
|
|
|
|
|
|
BUILD |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Git::Database::Object::Blob - A blob object in the Git object database |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 0.012 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $r = Git::Database->new(); # current Git repository |
36
|
|
|
|
|
|
|
my $blob = $r->get_object('b52168'); # abbreviated digest |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# attributes |
39
|
|
|
|
|
|
|
$blob->kind; # blob |
40
|
|
|
|
|
|
|
$blob->digest; # b6fc4c620b67d95f953a5c1c1230aaab5db5a1b0 |
41
|
|
|
|
|
|
|
$blob->content; # hello |
42
|
|
|
|
|
|
|
...; # etc., see below |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Git::Database::Object::Blob represents a C<blob> object |
47
|
|
|
|
|
|
|
obtained via L<Git::Database> from a Git object database. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 kind |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
The object kind: C<blob>. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 digest |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
The SHA-1 digest of the blob object. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 content |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
The object's actual content. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 size |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The size (in bytes) of the object content. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 new() |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Create a new Git::Object::Database::Blob object. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The C<content> argument is required. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 as_string() |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Same as C<content()>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SEE ALSO |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L<Git::Database>, |
82
|
|
|
|
|
|
|
L<Git::Database::Role::Object>. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Philippe Bruhat (BooK) <book@cpan.org>. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Copyright 2013-2016 Philippe Bruhat (BooK), all rights reserved. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 LICENSE |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
95
|
|
|
|
|
|
|
under the same terms as Perl itself. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=cut |