line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Bank::Wachovia::DataObtainer::WWW::Parser; |
2
|
8
|
|
|
8
|
|
1259
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
198
|
|
3
|
8
|
|
|
8
|
|
36
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
7363
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.2'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub get_credit_account_current_balance { |
8
|
1
|
|
|
1
|
0
|
4
|
get_account_available_balance( @_ ); |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub get_credit_account_available_credit { |
12
|
3
|
|
|
3
|
0
|
21
|
$_[-1] =~ /Available Credit/g; |
13
|
3
|
|
|
|
|
17
|
my($avail) = $_[-1] =~ /\G.*?\$([\d,.-]+)/s; |
14
|
3
|
|
|
|
|
9
|
$avail =~ s/,//g; |
15
|
3
|
|
|
|
|
27
|
return $avail; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub get_credit_account_limit { |
19
|
3
|
|
|
3
|
0
|
26
|
$_[-1] =~ /Credit Limit/g; |
20
|
3
|
|
|
|
|
17
|
my($limit) = $_[-1] =~ /\G.*?\$([\d,.-]+)/s; |
21
|
3
|
|
|
|
|
10
|
$limit =~ s/,//g; |
22
|
3
|
|
|
|
|
10
|
return $limit; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub get_account_numbers { |
26
|
12
|
|
|
12
|
0
|
1270
|
my $content = $_[-1]; |
27
|
12
|
|
|
|
|
20
|
my @nums; |
28
|
12
|
|
|
|
|
100
|
while( $content =~ m//g ){ |
29
|
26
|
|
|
|
|
116
|
my($num) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">.*?<\/A>/s; |
30
|
26
|
|
|
|
|
148
|
push @nums, $num; |
31
|
|
|
|
|
|
|
} |
32
|
12
|
|
|
|
|
58
|
return @nums; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub get_account_available_balance { |
36
|
13
|
|
|
13
|
0
|
46
|
my $account_num = $_[-1]; |
37
|
13
|
|
|
|
|
27
|
my $content = $_[-2]; |
38
|
13
|
|
|
|
|
106
|
while($content =~ m//g){ |
39
|
25
|
|
|
|
|
108
|
my($num) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">.*?<\/A>/s; |
40
|
25
|
|
|
|
|
40
|
my $bal; |
41
|
25
|
|
|
|
|
100
|
($bal) = $content =~ /\G.*?\$(\-?[\d,.-]+)/s; |
42
|
25
|
|
|
|
|
63
|
$bal =~ s/,//g; |
43
|
25
|
100
|
|
|
|
101
|
if( $num eq $account_num ){ |
44
|
13
|
|
|
|
|
128
|
return $bal; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub get_account_posted_balance { |
50
|
2
|
|
|
2
|
0
|
5
|
my $content = $_[-1]; |
51
|
2
|
|
|
|
|
3
|
my $bal; |
52
|
2
|
|
|
|
|
18
|
($bal) = $content =~ m|Posted Balance: \$([\d,.-]+)|g; |
53
|
2
|
|
|
|
|
7
|
$bal =~ s/,//g; |
54
|
2
|
|
|
|
|
7
|
return $bal; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub get_account_name { |
58
|
13
|
|
|
13
|
0
|
27
|
my $account_num = $_[-1]; |
59
|
13
|
|
|
|
|
23
|
my $content = $_[-2]; |
60
|
13
|
|
|
|
|
114
|
while($content =~ m//g){ |
61
|
23
|
|
|
|
|
110
|
my($num,$name) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">(.*?)<\/A>/s; |
62
|
23
|
|
|
|
|
49
|
my $bal; |
63
|
23
|
|
|
|
|
106
|
($bal) = $content =~ /\G.*?\$(\-?[\d,.-]+)/s; |
64
|
23
|
|
|
|
|
66
|
$bal =~ s/,//g; |
65
|
23
|
100
|
|
|
|
95
|
if( $num eq $account_num ){ |
66
|
13
|
|
|
|
|
123
|
return lc $name; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub get_account_type { |
72
|
5
|
|
|
5
|
0
|
24
|
my $content = $_[-1]; |
73
|
5
|
|
|
|
|
9
|
my $type; |
74
|
5
|
|
|
|
|
72
|
($type) = $content =~ m/(.+?)/g; |
75
|
5
|
|
|
|
|
52
|
return lc $type; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub get_account_transactions { |
79
|
4
|
|
|
4
|
0
|
8
|
my $content = $_[-1]; |
80
|
4
|
|
|
|
|
8
|
my @all_trans; |
81
|
4
|
|
|
|
|
53
|
while( $content =~ m/^var tblRow\d+ = new Array (.+?);$/mg ){ |
82
|
292
|
|
|
|
|
406
|
my %trans; |
83
|
|
|
|
|
|
|
@trans{ |
84
|
292
|
|
|
|
|
12782
|
qw( |
85
|
|
|
|
|
|
|
date |
86
|
|
|
|
|
|
|
action |
87
|
|
|
|
|
|
|
description |
88
|
|
|
|
|
|
|
withdrawal_amount |
89
|
|
|
|
|
|
|
deposit_amount |
90
|
|
|
|
|
|
|
balance |
91
|
|
|
|
|
|
|
seq_no |
92
|
|
|
|
|
|
|
trans_code |
93
|
|
|
|
|
|
|
check_num |
94
|
|
|
|
|
|
|
) |
95
|
|
|
|
|
|
|
} = eval $1; |
96
|
|
|
|
|
|
|
# this loop just gets rid of some dollar signs and commas that we don't need |
97
|
292
|
|
|
|
|
873
|
for(qw/withdrawal_amount deposit_amount balance/){ |
98
|
876
|
50
|
|
|
|
1524
|
next unless $trans{$_}; |
99
|
876
|
|
|
|
|
2469
|
$trans{$_} =~ s/\$|,//g; |
100
|
876
|
|
|
|
|
1694
|
$trans{$_} =~ s/ //g; |
101
|
|
|
|
|
|
|
} |
102
|
292
|
|
|
|
|
1392
|
push @all_trans, \%trans; |
103
|
|
|
|
|
|
|
} |
104
|
4
|
|
|
|
|
20
|
return \@all_trans; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |