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