line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Database::Backend::None; |
2
|
|
|
|
|
|
|
$Git::Database::Backend::None::VERSION = '0.011'; |
3
|
7
|
|
|
7
|
|
3303
|
use Moo; |
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
78
|
|
4
|
7
|
|
|
7
|
|
2350
|
use namespace::clean; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
with 'Git::Database::Role::Backend'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# we don't have a backend |
9
|
|
|
|
|
|
|
has '+store' => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
required => 0, |
12
|
|
|
|
|
|
|
init_arg => undef, |
13
|
|
|
|
|
|
|
predicate => 1, |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Git::Database::Backend::None - A minimal backend for Git::Database |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 VERSION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
version 0.011 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use Git::Database; |
31
|
|
|
|
|
|
|
use Git::Database::Backend::None; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $backend = Git::Database::Backend::None->new(); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# the empty tree |
36
|
|
|
|
|
|
|
my $tree = Git::Database::Object::Tree->new( content => '' ); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# 4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
39
|
|
|
|
|
|
|
my $digest = $backend->hash_object( $tree ); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
C<Git::Database::Backend::None> is the minimal backend class for |
44
|
|
|
|
|
|
|
L<Git::Database>. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
It can't read or write from a L<store|Git::Database::Tutorial/store>, |
47
|
|
|
|
|
|
|
because it doesn't have one. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 Git Database Roles |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This backend does the following roles |
52
|
|
|
|
|
|
|
(check their documentation for a list of supported methods): |
53
|
|
|
|
|
|
|
L<Git::Database::Role::Backend>. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Since it's not connected to a store, this class can't delegate the |
56
|
|
|
|
|
|
|
L<digest|Git::Database::Role::Object/digest> computation to Git |
57
|
|
|
|
|
|
|
itself. It therefore uses the default implementation provided by |
58
|
|
|
|
|
|
|
L<Git::Database::Role::Backend>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Philippe Bruhat (BooK) <book@cpan.org> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Copyright 2016 Philippe Bruhat (BooK), all rights reserved. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 LICENSE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
71
|
|
|
|
|
|
|
under the same terms as Perl itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |