ORM/TjoinNull.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 4 totaltotal 72.0% 18 / 25 CC 2 SCAR 4.7
CC
2
Cov
88%
new
2.0
null_class
2.0
copy
1.0
CRAP 1.6
« ORM/Meta/ORM/History.pm ↑ Summary ORM/Db/DBIResultSetFull.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::TjoinNull;
30  
31 5 $VERSION = 0.81;
32  
33 sub new
34 14 ▶{
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
35 14 my $class = shift;
36 14 my %arg = @_;
37 14 my $self = {};
38  
39 14 ▶ $self->{null_class} = $arg{null_class} if( $arg{null_class} );
Branch: 1 branch
BranchTrueFalseTotal
if $arg{"null_class"} 0 14 14
40  
41 14 return bless $self, $class;
42 }
43  
44 1 ▶sub copy { $_[0]; }
Subroutine copy: called CC=1 SCAR=0.0
Pod undocumented
45  
46 sub merge
47 7 ▶{
Subroutine merge: called CC=1 SCAR=0.0
Pod undocumented
48 7 my $self = shift;
49 7 my $tjoin = shift;
50 7 my $copy = $tjoin->copy;
51  
52 7 %{$self} = %{$copy};
53 7 bless $self, ref $copy;
54 }
55  
56 0 ▶sub null_class { shift->{null_class}; }
Subroutine null_class: not called CC=1 SCAR=6.9
Pod undocumented
« ORM/Meta/ORM/History.pm ↑ Summary ORM/Db/DBIResultSetFull.pm »