line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#********************************************************************* |
2
|
|
|
|
|
|
|
#*** ResourcePool::Resource::Alzabo |
3
|
|
|
|
|
|
|
#*** Copyright (c) 2004 Texas A&M University, |
4
|
|
|
|
|
|
|
#*** Based on ResourcePool::Resource::DBI |
5
|
|
|
|
|
|
|
#*** Copyright (c) 2002 by Markus Winand |
6
|
|
|
|
|
|
|
#*** $Id: Alzabo.pm,v 1.2 2004/04/15 20:59:43 jgsmith Exp $ |
7
|
|
|
|
|
|
|
#********************************************************************* |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package ResourcePool::Resource::Alzabo; |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
21
|
use vars qw($VERSION @ISA); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
141
|
|
12
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
75
|
|
13
|
3
|
|
|
3
|
|
34
|
use DBI; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
120
|
|
14
|
3
|
|
|
3
|
|
2658
|
use ResourcePool::Resource::DBI; |
|
3
|
|
|
|
|
4688
|
|
|
3
|
|
|
|
|
74
|
|
15
|
3
|
|
|
3
|
|
3012
|
use Alzabo::Runtime::Schema; |
|
3
|
|
|
|
|
385112
|
|
|
3
|
|
|
|
|
647
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$VERSION = "1.0100"; |
18
|
|
|
|
|
|
|
push @ISA, "ResourcePool::Resource::DBI"; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new($$$$$$) { |
21
|
2
|
|
|
2
|
0
|
3
|
my $proto = shift; |
22
|
2
|
|
33
|
|
|
9
|
my $class = ref($proto) || $proto; |
23
|
2
|
|
|
|
|
2
|
my $name = shift; |
24
|
2
|
|
|
|
|
12
|
my $self = $class->SUPER::new(@_); |
25
|
|
|
|
|
|
|
|
26
|
2
|
50
|
|
|
|
724
|
return unless $self; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
bless($self, $class); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $schema = Alzabo::Runtime::Schema -> load_from_file( name => $name ); |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$schema -> driver -> handle($self -> {dbh}); |
33
|
0
|
|
|
|
|
|
$schema -> connect; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
$self -> {schema} = $schema; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub get_plain_resource($) { |
41
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
42
|
0
|
|
|
|
|
|
return $self->{schema}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |