line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!perl |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
5431
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
145
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
169
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Rose::DBx::MoreConfig; |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
489
|
use parent 'Rose::DB'; |
|
4
|
|
|
|
|
356
|
|
|
4
|
|
|
|
|
24
|
|
9
|
|
|
|
|
|
|
|
10
|
4
|
|
|
4
|
|
787099
|
use File::Basename qw(dirname); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
296
|
|
11
|
4
|
|
|
4
|
|
22
|
use File::Spec; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
84
|
|
12
|
4
|
|
|
4
|
|
16
|
use Scalar::Util qw(blessed); |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
1350
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our ($VERSION) = '1.00'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub auto_load_fixups { |
17
|
3
|
|
|
3
|
1
|
3632
|
my ( $self, @args ) = @_; |
18
|
3
|
|
|
|
|
6
|
my $tried = 0; |
19
|
|
|
|
|
|
|
my $home = eval { |
20
|
|
|
|
|
|
|
require File::HomeDir; |
21
|
|
|
|
|
|
|
File::HomeDir->my_home; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|| $ENV{HOME} |
24
|
|
|
|
|
|
|
|| $ENV{LOGDIR} |
25
|
3
|
|
0
|
|
|
4
|
|| eval { ( getpwuid($<) )[7] } |
26
|
|
|
|
|
|
|
|| '__ALAS_NO_IDEA__'; |
27
|
3
|
|
|
|
|
58
|
$home = File::Spec->catfile( $home, '.rosedbrc' ); |
28
|
3
|
|
|
|
|
9
|
my $classpm = blessed($self); |
29
|
3
|
50
|
|
|
|
9
|
if ($classpm) { |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Clear the suffix Rose::DB adds to make a generated implementation class |
32
|
0
|
|
|
|
|
0
|
$classpm =~ s[::__RoseDBPrivate__::.*\.pm$][.pm]; |
33
|
0
|
|
|
|
|
0
|
$classpm =~ s[::][/]g; |
34
|
0
|
|
0
|
|
|
0
|
$classpm = $INC{$classpm} || $classpm; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
else { |
37
|
3
|
|
|
|
|
11
|
$classpm = (caller)[1]; |
38
|
|
|
|
|
|
|
} |
39
|
3
|
|
|
|
|
192
|
$classpm = File::Spec->catfile( dirname($classpm), '.rosedbrc' ); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Hush warnings from Rose::DB::load_yaml_fixup_file() about data |
42
|
|
|
|
|
|
|
# sources the current class doesn't implement |
43
|
3
|
|
|
|
|
11
|
my $warnhook = $SIG{__WARN__}; |
44
|
|
|
|
|
|
|
local $SIG{__WARN__} = sub { |
45
|
0
|
|
|
0
|
|
0
|
my $msg = $_[0]; |
46
|
0
|
0
|
|
|
|
0
|
return if $msg =~ /^No \S+ data source found/; |
47
|
0
|
0
|
|
|
|
0
|
if ( defined $warnhook ) { return $warnhook => (@_); } |
|
0
|
|
|
|
|
0
|
|
48
|
0
|
|
|
|
|
0
|
else { warn @_; } |
49
|
3
|
|
|
|
|
22
|
}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# First, give Rose::DB (or other parent) a chance to do its thing, |
52
|
|
|
|
|
|
|
# so ROSEDB_DEVINIT is handled. |
53
|
3
|
|
|
|
|
25
|
$self->SUPER::auto_load_fixups(@args); |
54
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
1837
|
foreach my $cand ( '/etc/rosedbrc', |
56
|
|
|
|
|
|
|
File::Spec->catfile( dirname( $INC{'Rose/DB.pm'} ), '.rosedbrc' ), |
57
|
|
|
|
|
|
|
$home, $classpm, $ENV{ROSEDBRC} ) |
58
|
|
|
|
|
|
|
{ |
59
|
6
|
100
|
66
|
|
|
90
|
next unless defined($cand) && -r $cand; |
60
|
2
|
|
|
|
|
3
|
$tried++; |
61
|
2
|
|
|
|
|
18
|
$self->load_yaml_fixup_file( $cand, @args ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
return $tried; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |