Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package A;
- use B;
- use С;
- sub new
- {
- my $class = shift;
- my $opt = shift;
- my $self = {
- connect1 => DB->connect(1),
- connect2 => DB->connect(2),
- connect3 => DB->connect(3),
- };
- $self->{opt} = $opt;
- bless $self, $class;
- }
- sub start
- {
- my $self = shift;
- if($self->{opt}->{B})
- {
- B->new($self)->start;
- }
- if($self->{opt}->{C})
- {
- C->new($self)->start;
- }
- }
- 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement