« blib/lib/CPAN/Testers/Schema/Result/TestReport.pm
↑ Summary
blib/lib/CPAN/Testers/Schema/Result/Stats.pm »
| 1 | 15 | ▶ | use utf8; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 2 | package CPAN::Testers::Schema::ResultSet::PerlVersion; | ||||||||||||||
| 3 | 15 | 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 | 15 | ▶ | use CPAN::Testers::Schema::Base 'ResultSet'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 25 | 15 | ▶ | use Log::Any '$LOG'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 26 | 15 | ▶ | use Carp (); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 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 | ▶ | sub maturity( $self, $maturity ) { | |||||||||||||
|
Subroutine
maturity: called CC=3 SCAR=11.4
Pod
documented
| |||||||||||||||
| 35 | 2 | ▶ | if ( $maturity eq 'stable' ) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 36 | 1 | return $self->search({ devel => 0 }); | |||||||||||||
| 37 | } | ||||||||||||||
| 38 | elsif ( $maturity eq 'dev' ) { | ||||||||||||||
| 39 | 1 | return $self->search({ devel => 1 }); | |||||||||||||
| 40 | } | ||||||||||||||
| 41 | 0 | Carp::croak "Unknown maturity: $maturity. Must be one of: 'stable', 'dev'"; | |||||||||||||
| 42 | } | ||||||||||||||
| 43 | |||||||||||||||
| 44 | |||||||||||||||
| 45 | 15 | 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 | ||||||||||||||