| 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.036000'; |
|
3
|
|
|
|
|
|
|
# ABSTRACT: Verify that the Results and ResultSets have the correct base class |
|
4
|
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
84566
|
use strict; |
|
|
2
|
|
|
|
|
14
|
|
|
|
2
|
|
|
|
|
49
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
40
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
387
|
use MRO::Compat; |
|
|
2
|
|
|
|
|
1372
|
|
|
|
2
|
|
|
|
|
52
|
|
|
9
|
2
|
|
|
2
|
|
11
|
use mro 'c3'; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
10
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
49
|
use base 'DBIx::Class::Helper::Schema::Verifier'; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
693
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub result_verifiers { |
|
14
|
|
|
|
|
|
|
( |
|
15
|
|
|
|
|
|
|
sub { |
|
16
|
7
|
|
|
7
|
|
190
|
my ($s, $result, $set) = @_; |
|
17
|
|
|
|
|
|
|
|
|
18
|
7
|
|
|
|
|
23
|
my $base_result = $s->base_result; |
|
19
|
7
|
|
|
|
|
26
|
my $base_set = $s->base_resultset; |
|
20
|
|
|
|
|
|
|
|
|
21
|
7
|
100
|
|
|
|
99
|
die "$result is not a $base_result" unless $result->isa($base_result); |
|
22
|
6
|
100
|
|
|
|
40
|
die "$set is not a $base_set" unless $set->isa($base_set); |
|
23
|
|
|
|
|
|
|
}, |
|
24
|
|
|
|
|
|
|
shift->next::method, |
|
25
|
|
|
|
|
|
|
) |
|
26
|
7
|
|
|
7
|
1
|
1467
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
4
|
|
|
4
|
0
|
7
|
sub base_result { 'DBIx::Class::Core' } |
|
29
|
4
|
|
|
4
|
0
|
6
|
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 |