line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Bank::LloydsTSB::utils; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Finance::Bank::LloydsTSB::utils - internal utility routines |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
10
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.35'; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
5
|
use base 'Exporter'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
207
|
|
15
|
|
|
|
|
|
|
our @EXPORT_OK = qw(trim debug); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub trim { |
18
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
19
|
0
|
|
|
|
|
|
my ($text) = @_; |
20
|
0
|
|
|
|
|
|
$text =~ s/^\s+//; |
21
|
0
|
|
|
|
|
|
$text =~ s/\s+$//; |
22
|
0
|
|
|
|
|
|
return $text; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub debug { |
26
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
27
|
0
|
|
0
|
|
|
|
my $varname = (ref($class) || $class) . "::DEBUG"; |
28
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
29
|
0
|
0
|
|
|
|
|
warn @_ if $$varname; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |