File Coverage

blib/lib/DBIx/Class/Helper/ResultSet/Shortcut/Search/Like.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package DBIx::Class::Helper::ResultSet::Shortcut::Search::Like;
2             $DBIx::Class::Helper::ResultSet::Shortcut::Search::Like::VERSION = '2.034002';
3 56     56   21208 use strict;
  56         129  
  56         1270  
4 56     56   243 use warnings;
  56         108  
  56         1230  
5              
6 56     56   248 use parent 'DBIx::Class::Helper::ResultSet::Shortcut::Search::Base';
  56         113  
  56         249  
7              
8              
9             sub like {
10 1     1 1 802 my ($self, $columns, $cond) = @_;
11              
12 1         10 return $self->_helper_apply_search({ '-like' => $cond }, $columns);
13             }
14              
15             1;
16              
17             __END__
18              
19             =pod
20              
21             =head1 NAME
22              
23             DBIx::Class::Helper::ResultSet::Shortcut::Search::Like
24              
25             =head2 like($column || \@columns, $cond)
26              
27             $rs->like('lyrics', '%zebra%');
28             $rs->like(['lyrics', 'title'], '%zebra%');
29              
30             =head1 AUTHOR
31              
32             Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
33              
34             =head1 COPYRIGHT AND LICENSE
35              
36             This software is copyright (c) 2019 by Arthur Axel "fREW" Schmidt.
37              
38             This is free software; you can redistribute it and/or modify it under
39             the same terms as the Perl 5 programming language system itself.
40              
41             =cut