Helper/ResultSet/IgnoreWantarray.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 93.1% 27 / 29 CC 3 SCAR 6.3
CC
3
Cov
95%
search
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« Helper/Schema/Verifier.pm ↑ Summary Helper/Schema/LintContents.pm »
1 package DBIx::Class::Helper::ResultSet::IgnoreWantarray;
2 1 $DBIx::Class::Helper::ResultSet::IgnoreWantarray::VERSION = '2.037000';
3 # ABSTRACT: Get rid of search context issues
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use parent 'DBIx::Class::ResultSet';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 7 ▶sub search :DBIC_method_is_indirect_sugar{
Subroutine search: called CC=3 SCAR=11.1
Pod documented
11 7 ▶ $_[0]->throw_exception ('->search is *not* a mutator, calling it in void context makes no sense')
Branch: 1 branch
BranchTrueFalseTotal
unless defined wantarray or (caller)[0] =~ /^DBIx\:\:Class\:\:/ 1 6 7
Condition66%2/3
defined wantarray or (caller)[0] =~ /^DBIx\:\:Class\:\:/
l!l&&r!l&&!r
601
MC/DC50%1/2
defined wantarray or (caller)[0] =~ /^DBIx\:\:Class\:\:/
defined wantarray (caller)[0] =~ /^DBIx\:\:Class\:\:/
Truth table66%2/3
A or B
A= defined wantarrayB= (caller)[0] =~ /^DBIx\:\:Class\:\:/
ABresult
1X1
011
000
12 if !defined wantarray && (caller)[0] !~ /^\QDBIx::Class::/;
13  
14 6 shift->search_rs(@_);
15 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 1 1;
18  
19 __END__
« Helper/Schema/Verifier.pm ↑ Summary Helper/Schema/LintContents.pm »