PopulateMore/Inflator/Index.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 73.3% 11 / 15 CC 2 SCAR 6.1
CC
2
Cov
80%
inflate
2.3
BEGIN
1.0
CRAP 1.8
« PopulateMore/Visitor.pm ↑ Summary PopulateMore/Command.pm »
1 package DBIx::Class::Schema::PopulateMore::Inflator::Index;
2  
3 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 extends 'DBIx::Class::Schema::PopulateMore::Inflator';
5  
6 =head1 NAME
7  
8 DBIx::Class::Schema::PopulateMore::Inflator::Index - Coerce DateTime from Strings
9  
10 =head1 DESCRIPTION
11  
12 Allows you to make the value equal to the result object of a previously
13 inserted row.
14  
15 =head1 ATTRIBUTES
16  
17 This class defines the following attributes.
18  
19 =head1 METHODS
20  
21 This module defines the following methods.
22  
23 =head2 inflate($command, $string)
24  
25 This is called by Populate's dispatcher, when there is a match.
26  
27 =cut
28  
29 sub inflate
30 {
31 25 ▶ my ($self, $command, $string) = @_;
Subroutine inflate: called CC=2 SCAR=8.1
Pod documented
32  
33 25 ▶ return $command->get_rs_index($string)
Condition33%1/3
$command->get_rs_index($string) || $command->exception_cb->("Bad Index in Fixture: $string")
l!l&&r!l&&!r
2500
MC/DC0%0/2
$command->get_rs_index($string) || $command->exception_cb->("Bad Index in Fixture: $string")
$command->get_rs_index($string) $command->exception_cb->("Bad Index in Fixture: $string")
Truth table33%1/3
A || B
A= $command->get_rs_index($string)B= $command->exception_cb->("Bad Index in Fixture: $string")
ABresult
1X1
011
000
34 || $command->exception_cb->("Bad Index in Fixture: $string");
35 }
36  
37  
38 =head1 AUTHOR
39  
40 Please see L<DBIx::Class::Schema::PopulateMore> For authorship information
41  
42 =head1 LICENSE
43  
44 Please see L<DBIx::Class::Schema::PopulateMore> For licensing terms.
45  
46 =cut
47  
48  
49 3 1;
« PopulateMore/Visitor.pm ↑ Summary PopulateMore/Command.pm »