| 1 | package DBomb::DBH::Owner; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | DBomb::DBH::Owner - A class that has $dbh data. | ||
| 6 | |||
| 7 | =cut | ||
| 8 | |||
| 9 | ## Note: Decide carefully when to use __PACKAGE__ and when to use $class. | ||
| 10 | |||
| 11 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 11 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 11 | ▶ | use Carp::Assert; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 11 | ▶ | use base qw(Class::Data::Inheritable); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | our $VERSION = '$Revision: 1.3 $'; | ||
| 16 | |||
| 17 | |||
| 18 | ## Grabs from the writer pool. For code that doesn't know what it needs. | ||
| 19 | __PACKAGE__->mk_classdata('dbh'); | ||
| 20 | |||
| 21 | __PACKAGE__->mk_classdata('_dbh_reader_pool'); | ||
| 22 | __PACKAGE__->mk_classdata('_dbh_writer_pool'); | ||
| 23 | |||
| 24 | |||
| 25 | ## TODO | ||
| 26 | |||
| 27 | ## accessor wrapper around the pool. | ||
| 28 | sub dbh_reader { | ||
| 29 | die "Not implemented"; | ||
| 30 | my $class = ref($_[0]) ? ref(shift) : shift; | ||
| 31 | my $pool; | ||
| 32 | |||
| 33 | if (@_){ | ||
| 34 | } | ||
| 35 | |||
| 36 | } | ||
| 37 | |||
| 38 | sub dbh_writer { | ||
| 39 | die "Not implemented"; | ||
| 40 | } | ||
| 41 | |||
| 42 | |||
| 43 | 1; | ||
| 44 | __END__ | ||