File: Opa.pm

package info (click to toggle)
librose-db-object-perl 1%3A0.815-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,048 kB
  • sloc: perl: 79,670; sql: 28; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package My::DB::Opa;

use strict;

use base qw(Rose::DB);

our $Connection_Count = 0;

__PACKAGE__->use_private_registry;

__PACKAGE__->registry->add_entry(Rose::DB->registry->entry(type => 'sqlite_admin', domain => 'test')->clone);

__PACKAGE__->default_type('sqlite_admin');

sub init_dbh
{
  $Connection_Count++;
  return shift->SUPER::init_dbh(@_);
}

sub connection_count
{
  my ($self, $val) = @_;
  return defined $val ? $Connection_Count = $val : $Connection_Count;
}

1;