ORM/Filter.pm

filter: Statementstmt 100% 15 / 15 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 91.6% 22 / 24 CC 3 SCAR 7.0
CC
3
Cov
95%
scalar2sql
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« ORM/Expr.pm ↑ Summary ORM/Db/Replicated.pm »
1 #
2 # DESCRIPTION
3 # PerlORM - Object relational mapper (ORM) for Perl. PerlORM is Perl
4 # library that implements object-relational mapping. Its features are
5 # much similar to those of Java's Hibernate library, but interface is
6 # much different and easier to use.
7 #
8 # AUTHOR
9 # Alexey V. Akimov <akimov_alexey@sourceforge.net>
10 #
11 # COPYRIGHT
12 # Copyright (C) 2005-2006 Alexey V. Akimov
13 #
14 # This library is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU Lesser General Public
16 # License as published by the Free Software Foundation; either
17 # version 2.1 of the License, or (at your option) any later version.
18 #
19 # This library is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # Lesser General Public License for more details.
23 #
24 # You should have received a copy of the GNU Lesser General Public
25 # License along with this library; if not, write to the Free Software
26 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 #
28  
29 package ORM::Filter;
30  
31 5 $VERSION=0.8;
32  
33 5 ▶use ORM;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 5 ▶use overload 'fallback' => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
35 5 ▶use base 'ORM::Expr';
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 ##
38 ## SUBROUTINES
39 ##
40  
41 sub scalar2sql
42 24 ▶{
Subroutine scalar2sql: called CC=3 SCAR=11.0
Pod undocumented
43 24 my $class = shift;
44 24 my $scalar = shift;
45 24 my $tjoin = shift;
46 24 my $ident = shift;
47  
48 return
49 24 ▶ ref $scalar
Branch: 2 branches
BranchTrueFalseTotal
ref $scalar ? : 12 12 24
defined $scalar ? : 12 0 12
50 ? $scalar->_sql_str( tjoin=>$tjoin, ident=>$ident )
51 : ( defined $scalar ? $tjoin->class->ORM::qc( $scalar ) : 'NULL' );
52 }
« ORM/Expr.pm ↑ Summary ORM/Db/Replicated.pm »