line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/bin/false |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Copyright (c) 2002 Craig Welch |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public |
6
|
|
|
|
|
|
|
# License or the Artistic License, as specified in the Perl README file. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package ObjectRowMapTest; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
645
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
11
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use vars qw( @ISA ); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
50
|
|
14
|
1
|
|
|
1
|
|
526
|
use ObjectRowMap; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
push @ISA, 'ObjectRowMap'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $ormapProps; |
19
|
|
|
|
|
|
|
if (!defined($ormapProps)) { |
20
|
|
|
|
|
|
|
$ormapProps = { 'table'=>'test','keyFields'=>['login','uid'],'dbhConnectArgs'=>["DBI:Pg:dbname=ormaptest",'login','password',{'AutoCommit'=>0}],'persistFields'=>{'login'=>'','uid'=>'','password'=>'','gecos'=>''},'debug'=>0,'commitOnSave'=>1}; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub ormapProperties { |
24
|
|
|
|
|
|
|
return $ormapProps; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub preSave_password { |
28
|
|
|
|
|
|
|
my $self = shift; |
29
|
|
|
|
|
|
|
my $pass = shift; |
30
|
|
|
|
|
|
|
$pass .= "_SUPERENCRYPTED"; |
31
|
|
|
|
|
|
|
return $pass; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub postLoad_password { |
35
|
|
|
|
|
|
|
my $self = shift; |
36
|
|
|
|
|
|
|
my $pass = shift; |
37
|
|
|
|
|
|
|
$pass =~ s/_SUPERENCRYPTED//; |
38
|
|
|
|
|
|
|
return $pass; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_uid { |
42
|
|
|
|
|
|
|
my $self = shift; |
43
|
|
|
|
|
|
|
my $uid = shift; |
44
|
|
|
|
|
|
|
print STDERR "Get Intercepted uid $uid\n"; |
45
|
|
|
|
|
|
|
return $uid; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub set_uid { |
49
|
|
|
|
|
|
|
my $self = shift; |
50
|
|
|
|
|
|
|
my $uid = shift; |
51
|
|
|
|
|
|
|
print STDERR "Set Intercepted uid $uid, adding 10 for kicks\n"; |
52
|
|
|
|
|
|
|
$uid = $uid + 10; |
53
|
|
|
|
|
|
|
return $uid; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|