line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
1179
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
3
|
1
|
|
|
1
|
|
1220
|
use utf8; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Dist::Zilla::Util::Git::Refs::Ref; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
110
|
$Dist::Zilla::Util::Git::Refs::Ref::AUTHORITY = 'cpan:KENTNL'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
|
$Dist::Zilla::Util::Git::Refs::Ref::VERSION = '0.002000'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: An Abstract REF node |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
509
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has name => ( isa => 'Str', required => 1, is => ro => ); |
19
|
|
|
|
|
|
|
has git => ( isa => 'Object', required => 1, is => ro => ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub refname { |
23
|
|
|
|
|
|
|
my ($self) = @_; |
24
|
|
|
|
|
|
|
return $self->name; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub sha1 { |
29
|
|
|
|
|
|
|
my ($self) = @_; |
30
|
|
|
|
|
|
|
my ($refname) = $self->refname; |
31
|
|
|
|
|
|
|
my (@sha1s) = $self->git->rev_parse($refname); |
32
|
|
|
|
|
|
|
if ( scalar @sha1s > 1 ) { |
33
|
|
|
|
|
|
|
require Carp; |
34
|
|
|
|
|
|
|
return Carp::confess( q[Fatal: rev-parse ] . $refname . q[ returned multiple values] ); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
return shift @sha1s; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
no Moose; |
40
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Dist::Zilla::Util::Git::Refs::Ref - An Abstract REF node |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 0.002000 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 C<refname> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Return the fully qualified ref name for this object. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 C<sha1> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Return the C<SHA1> resolving for C<refname> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 C<name> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 C<git> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Kent Fredric <kentfredric@gmail.com> |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
82
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |