line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Database::Role::RefWriter; |
2
|
|
|
|
|
|
|
$Git::Database::Role::RefWriter::VERSION = '0.011'; |
3
|
7
|
|
|
7
|
|
8110
|
use Moo::Role; |
|
7
|
|
|
|
|
25
|
|
|
7
|
|
|
|
|
117
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
requires |
6
|
|
|
|
|
|
|
'put_ref', |
7
|
|
|
|
|
|
|
'delete_ref' |
8
|
|
|
|
|
|
|
; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
1; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__END__ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=pod |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Git::Database::Role::RefWriter - Abstract role for Git backends that write references |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
version 0.011 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
package MyGitBackend; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
use Moo; |
29
|
|
|
|
|
|
|
use namespace::clean; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
with |
32
|
|
|
|
|
|
|
'Git::Database::Role::Backend', |
33
|
|
|
|
|
|
|
'Git::Database::Role::RefWriter'; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# implement the required methods |
36
|
|
|
|
|
|
|
sub put_ref { ... } |
37
|
|
|
|
|
|
|
sub delete_ref { ... } |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 DESCRIPTION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
A L<backend|Git::Database::Role::Backend> doing the additional |
42
|
|
|
|
|
|
|
Git::Database::Role::RefWriter role is capable of writing references |
43
|
|
|
|
|
|
|
to a Git repository. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 REQUIRED METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 put_ref |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$backend->put_ref( 'refs/heads/master', $digest ); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Add or update the (fully qualified) refname to point to the given digest. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 delete_ref |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$backend->delete_ref( 'refs/heads/master' ); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Unconditionaly delete the given refname. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Philippe Bruhat (BooK) <book@cpan.org>. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Copyright 2016 Philippe Bruhat (BooK), all rights reserved. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 LICENSE |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
70
|
|
|
|
|
|
|
under the same terms as Perl itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |