line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
13
|
|
|
13
|
|
12828
|
use utf8; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
70
|
|
2
|
|
|
|
|
|
|
package CPAN::Testers::Schema::ResultSet::PerlVersion; |
3
|
|
|
|
|
|
|
our $VERSION = '0.025'; |
4
|
|
|
|
|
|
|
# ABSTRACT: Query Perl version metadata |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#pod =head1 SYNOPSIS |
7
|
|
|
|
|
|
|
#pod |
8
|
|
|
|
|
|
|
#pod my $rs = $schema->resultset( 'PerlVersion' ); |
9
|
|
|
|
|
|
|
#pod $rs->find_or_create({ version => '5.27.0' }); |
10
|
|
|
|
|
|
|
#pod |
11
|
|
|
|
|
|
|
#pod $rs = $rs->maturity( 'stable' ); # or 'dev' |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod This object helps to query Perl version metadata. |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod =head1 SEE ALSO |
18
|
|
|
|
|
|
|
#pod |
19
|
|
|
|
|
|
|
#pod L<CPAN::Testers::Schema::Result::PerlVersion>, L<DBIx::Class::ResultSet>, |
20
|
|
|
|
|
|
|
#pod L<CPAN::Testers::Schema> |
21
|
|
|
|
|
|
|
#pod |
22
|
|
|
|
|
|
|
#pod =cut |
23
|
|
|
|
|
|
|
|
24
|
13
|
|
|
13
|
|
696
|
use CPAN::Testers::Schema::Base 'ResultSet'; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
79
|
|
25
|
13
|
|
|
13
|
|
2275
|
use Log::Any '$LOG'; |
|
13
|
|
|
|
|
34258
|
|
|
13
|
|
|
|
|
67
|
|
26
|
13
|
|
|
13
|
|
9826
|
use Carp (); |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
1795
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#pod =method maturity |
29
|
|
|
|
|
|
|
#pod |
30
|
|
|
|
|
|
|
#pod Filter Perl versions of the given maturity. One of C<stable> or C<dev>. |
31
|
|
|
|
|
|
|
#pod |
32
|
|
|
|
|
|
|
#pod =cut |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
2
|
1
|
5853
|
sub maturity( $self, $maturity ) { |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
3
|
|
35
|
2
|
100
|
|
|
|
10
|
if ( $maturity eq 'stable' ) { |
|
|
50
|
|
|
|
|
|
36
|
1
|
|
|
|
|
5
|
return $self->search({ devel => 0 }); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
elsif ( $maturity eq 'dev' ) { |
39
|
1
|
|
|
|
|
4
|
return $self->search({ devel => 1 }); |
40
|
|
|
|
|
|
|
} |
41
|
0
|
|
|
|
|
|
Carp::croak "Unknown maturity: $maturity. Must be one of: 'stable', 'dev'"; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
CPAN::Testers::Schema::ResultSet::PerlVersion - Query Perl version metadata |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 VERSION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
version 0.025 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
my $rs = $schema->resultset( 'PerlVersion' ); |
62
|
|
|
|
|
|
|
$rs->find_or_create({ version => '5.27.0' }); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$rs = $rs->maturity( 'stable' ); # or 'dev' |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 DESCRIPTION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This object helps to query Perl version metadata. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 maturity |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Filter Perl versions of the given maturity. One of C<stable> or C<dev>. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SEE ALSO |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<CPAN::Testers::Schema::Result::PerlVersion>, L<DBIx::Class::ResultSet>, |
79
|
|
|
|
|
|
|
L<CPAN::Testers::Schema> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHORS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=over 4 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Oriol Soriano <oriolsoriano@gmail.com> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Doug Bell <preaction@cpan.org> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Oriol Soriano, Doug Bell. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
100
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |