Lines 41-48
use vars qw($database);
Link Here
|
41 |
|
41 |
|
42 |
__PACKAGE__->mk_accessors(qw( )); |
42 |
__PACKAGE__->mk_accessors(qw( )); |
43 |
|
43 |
|
44 |
our $schema; # the schema is a singleton |
|
|
45 |
|
46 |
# _new_schema |
44 |
# _new_schema |
47 |
# Internal helper function (not a method!). This creates a new |
45 |
# Internal helper function (not a method!). This creates a new |
48 |
# database connection from the data given in the current context, and |
46 |
# database connection from the data given in the current context, and |
Lines 112-118
creates one, and connects to the database.
Link Here
|
112 |
|
110 |
|
113 |
This database handle is cached for future use: if you call |
111 |
This database handle is cached for future use: if you call |
114 |
C<$database-E<gt>schema> twice, you will get the same handle both |
112 |
C<$database-E<gt>schema> twice, you will get the same handle both |
115 |
times. If you need a second database handle, use C<&new_schema>. |
113 |
times. If you need a second database handle, use C<&new_schema> and |
|
|
114 |
possibly C<&set_schema>. |
116 |
|
115 |
|
117 |
=cut |
116 |
=cut |
118 |
|
117 |
|
119 |
- |
|
|