line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DBIx::Class::Helper::Schema::Verifier::Parent; |
2
|
|
|
|
|
|
|
$DBIx::Class::Helper::Schema::Verifier::Parent::VERSION = '2.035000'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Verify that the Results and ResultSets have the correct base class |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
104173
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
61
|
|
6
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
69
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
513
|
use MRO::Compat; |
|
2
|
|
|
|
|
1755
|
|
|
2
|
|
|
|
|
50
|
|
9
|
2
|
|
|
2
|
|
12
|
use mro 'c3'; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
13
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
59
|
use base 'DBIx::Class::Helper::Schema::Verifier'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
812
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub result_verifiers { |
14
|
|
|
|
|
|
|
( |
15
|
|
|
|
|
|
|
sub { |
16
|
7
|
|
|
7
|
|
232
|
my ($s, $result, $set) = @_; |
17
|
|
|
|
|
|
|
|
18
|
7
|
|
|
|
|
32
|
my $base_result = $s->base_result; |
19
|
7
|
|
|
|
|
24
|
my $base_set = $s->base_resultset; |
20
|
|
|
|
|
|
|
|
21
|
7
|
100
|
|
|
|
115
|
die "$result is not a $base_result" unless $result->isa($base_result); |
22
|
6
|
100
|
|
|
|
46
|
die "$set is not a $base_set" unless $set->isa($base_set); |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
shift->next::method, |
25
|
|
|
|
|
|
|
) |
26
|
7
|
|
|
7
|
1
|
1753
|
} |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
4
|
0
|
10
|
sub base_result { 'DBIx::Class::Core' } |
29
|
4
|
|
|
4
|
0
|
8
|
sub base_resultset { 'DBIx::Class::ResultSet' } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
DBIx::Class::Helper::Schema::Verifier::Parent - Verify that the Results and ResultSets have the correct base class |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
package MyApp::Schema; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__PACKAGE__->load_components('Helper::Schema::Verifier::Parent'); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub base_result { 'MyApp::Schema::Result' } |
48
|
|
|
|
|
|
|
sub base_resultset { 'MyApp::Schema::ResultSet' } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
C<DBIx::Class::Helper::Schema::Verifier::Parent> verifies that all of your |
53
|
|
|
|
|
|
|
results and resultsets use the base class that you specify. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |