line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# POE::Component::IRC::Service |
2
|
|
|
|
|
|
|
# By Chris Williams |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This module may be used, modified, and distributed under the same |
5
|
|
|
|
|
|
|
# terms as Perl itself. Please see the license that came with your Perl |
6
|
|
|
|
|
|
|
# distribution for details. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package POE::Component::IRC::Service; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# This is just a wrapper for the following modules |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
77656
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
14
|
1
|
|
|
1
|
|
508
|
use POE::Component::IRC::Service::P10; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
15
|
1
|
|
|
1
|
|
582
|
use POE::Component::IRC::Service::Hybrid; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
16
|
1
|
|
|
1
|
|
8
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
17
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
155
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$VERSION = '0.998'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub new { |
22
|
1
|
|
|
1
|
1
|
101
|
my ($package,$alias,$ircdtype) = splice @_, 0, 3; |
23
|
1
|
|
|
|
|
3
|
my $object; |
24
|
|
|
|
|
|
|
|
25
|
1
|
50
|
33
|
|
|
9
|
unless ($alias and $ircdtype) { |
26
|
0
|
|
|
|
|
0
|
croak "Not enough arguments to POE::Component::IRC::Service::new()"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
SWITCH: { |
30
|
1
|
50
|
|
|
|
3
|
if ($ircdtype =~ /^p10$/i) { |
|
1
|
|
|
|
|
9
|
|
31
|
1
|
|
|
|
|
12
|
$object = POE::Component::IRC::Service::P10->new($alias,@_); |
32
|
1
|
|
|
|
|
3
|
last SWITCH; |
33
|
|
|
|
|
|
|
} |
34
|
0
|
0
|
|
|
|
0
|
if ($ircdtype =~ /^Hybrid$/i) { |
35
|
0
|
|
|
|
|
0
|
croak "Not implemented yet"; |
36
|
0
|
|
|
|
|
0
|
$object = POE::Component::IRC::Service::Hybrid->new($alias,@_); |
37
|
0
|
|
|
|
|
0
|
last SWITCH; |
38
|
|
|
|
|
|
|
} |
39
|
0
|
|
|
|
|
0
|
croak "Don't know that IRCD type sorry"; |
40
|
|
|
|
|
|
|
} |
41
|
1
|
|
|
|
|
4
|
return $object; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |