OFX/Account.pm

filter: Statementstmt 29.6% 8 / 27 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 28.5% 2 / 7 Podpod 80.0% 4 / 5 totaltotal 28.0% 14 / 50 CC 5 SCAR 15.5
CC
5
Cov
22%
new
6.0
type
6.0
fid
6.0
CRAP 4.7
« OFX/Tree.pm ↑ Summary Build.pl »
1 # Filename: Account.pm
2 #
3 # Class interface for an OFX account
4 # http://www.ofx.net/
5 #
6 # Created February 11, 2008 Brandon Fosdick <bfoz@bfoz.net>
7 #
8 # Copyright 2008 Brandon Fosdick <bfoz@bfoz.net> (BSD License)
9 #
10 # $Id: Account.pm,v 1.2 2008/03/04 04:22:27 bfoz Exp $
11  
12 package Finance::OFX::Account;
13  
14 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 2 our $VERSION = '2';
18  
19 sub new
20 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
21 0 my ($this, %options) = @_;
22 0 ▶ my $class = ref($this) || $this;
Condition0%0/3
ref $this || $this
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table0%0/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
23 0 my $self = {};
24 0 bless $self, $class;
25  
26 # Initialization
27 0 $self->{Type} = delete $options{Type};
28 0 $self->{ID} = delete $options{ID};
29 0 $self->{FID} = delete $options{FID};
30  
31 0 return $self;
32 }
33  
34 sub type
35 0 ▶{
Subroutine type: not called CC=2 SCAR=17.9
Pod documented
36 0 my $s = shift;
37 0 ▶ $s->{Type} = shift if scalar @_;
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ 0 0 0
38 0 $s->{Type};
39 }
40  
41 sub fid
42 0 ▶{
Subroutine fid: not called CC=2 SCAR=17.9
Pod documented
43 0 my $s = shift;
44 0 ▶ $s->{FID} = shift if scalar @_; # Assign new value if an argument is given
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ 0 0 0
45 0 $s->{FID}; # Return the stored value
46 }
47  
48 sub id
49 0 ▶{
Subroutine id: not called CC=2 SCAR=17.9
Pod documented
50 0 my $s = shift;
51 0 ▶ $s->{ID} = shift if scalar @_;
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ 0 0 0
52 0 $s->{ID};
53 }
54  
55 sub bankacctfrom
56 0 ▶{
Subroutine bankacctfrom: not called CC=1 SCAR=6.9
Pod undocumented
57 0 my $s = shift;
58 '<BANKACCTFROM><BANKID>'.$s->{FID}.
59 '<ACCTID>'.$s->{ID}.
60 '<ACCTTYPE>'.$s->{Type}.
61 0 '</BANKACCTFROM>';
62 }
63  
64 2 1;
65  
66 __END__
« OFX/Tree.pm ↑ Summary Build.pl »