File Coverage

blib/lib/Hub/Base/Object.pm
Criterion Covered Total %
statement 6 16 37.5
branch n/a
condition 0 3 0.0
subroutine 2 5 40.0
pod 3 3 100.0
total 11 27 40.7


line stmt bran cond sub pod time code
1             package Hub::Base::Object;
2 1     1   5 use strict;
  1         2  
  1         28  
3 1     1   4 use Hub qw/:lib/;
  1         2  
  1         4  
4             our $VERSION = '4.00043';
5             our @EXPORT = qw//;
6             our @EXPORT_OK = qw//;
7              
8             # ------------------------------------------------------------------------------
9             # new - Constructor.
10             # new [@parameters]
11             # Parameters are passed to the standard initialization method L.
12             # ------------------------------------------------------------------------------
13              
14             sub new {
15 0     0 1   my $self = shift;
16 0   0       my $class = ref( $self ) || $self;
17 0           my $obj = bless {}, $self;
18 0           my $tied = tie %$obj, 'Hub::Knots::Object', $obj;
19 0           $obj->{'internal:tied'} = $tied;
20 0           $obj->refresh( @_ );
21 0           return $obj;
22             }#new
23              
24             # ------------------------------------------------------------------------------
25             # daccess - Direct access to member hashes
26             # daccess $hash_key
27             # Where $hash_key and be:
28             # 'public' Public hash
29             # 'private' Private hash
30             # 'internal' Internal hash (used to tie things together)
31             # ------------------------------------------------------------------------------
32              
33             sub daccess {
34 0     0 1   my ($self,$opts) = Hub::objopts( \@_ );
35 0           $self->{'internal:tied'}->_access( @_ );
36             }#daccess
37              
38             # ------------------------------------------------------------------------------
39             # refresh - Return instance to initial state.
40             # refresh [@parameters]
41             #
42             # Interface method, override in your derived class. Nothing is done in this
43             # base class.
44             #
45             # Called implictly by L, and when persistent interpreters (such as
46             # mod_perl) would have called L.
47             # ------------------------------------------------------------------------------
48              
49 0     0 1   sub refresh {
50             # my ($self,$opts) = Hub::objopts( \@_ );
51             }#refresh
52              
53             # ------------------------------------------------------------------------------
54             1;
55              
56             __END__