| 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
Condition66%2/3
defined wantarray or (caller)[0] =~ /^DBIx\:\:Class\:\:/
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\:\:/
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||