line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Raw::Blob; |
2
|
|
|
|
|
|
|
$Git::Raw::Blob::VERSION = '0.90'; |
3
|
36
|
|
|
36
|
|
231
|
use strict; |
|
36
|
|
|
|
|
58
|
|
|
36
|
|
|
|
|
972
|
|
4
|
36
|
|
|
36
|
|
158
|
use warnings; |
|
36
|
|
|
|
|
63
|
|
|
36
|
|
|
|
|
1863
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
11
|
|
|
11
|
|
23435
|
'""' => sub { return $_[0] -> id }, |
7
|
36
|
|
|
36
|
|
237
|
fallback => 1; |
|
36
|
|
|
|
|
60
|
|
|
36
|
|
|
|
|
295
|
|
8
|
|
|
|
|
|
|
|
9
|
36
|
|
|
36
|
|
2588
|
use Git::Raw; |
|
36
|
|
|
|
|
81
|
|
|
36
|
|
|
|
|
1388
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Git::Raw::Blob - Git blob class |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
version 0.90 |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
A L represents a Git blob. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
B: The API of this module is unstable and may change without warning |
24
|
|
|
|
|
|
|
(any change will be appropriately documented in the changelog). |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 METHODS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 create( $repo, $buffer ) |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Create a new blob from the given buffer. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 lookup( $repo, $id ) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Retrieve the blob corresponding to C<$id>. This function is pretty much the |
35
|
|
|
|
|
|
|
same as C<$repo-Elookup($id)> except that it only returns blobs. If the blob |
36
|
|
|
|
|
|
|
doesn't exist, this function wil return C. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 owner( ) |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Retrieve the L owning the blob. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 content( ) |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Retrieve the raw content of a blob. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 size( ) |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Retrieve the size of the raw content of a blob. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 id( ) |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Return the raw ID (the SHA-1 hash) of the blob as a string. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 is_binary( ) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Determine if the blob content is most certainly binary or not. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 is_blob( ) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns true. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 is_tree( ) |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Returns false. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Alessandro Ghedini |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Copyright 2012 Alessandro Ghedini. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
79
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
80
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; # End of Git::Raw::Blob |