| 1 | # POE::Component::IRC::Service | ||||||||||||||||||||||||||||
| 2 | # By Chris Williams <chris@bingosnet.co.uk> | ||||||||||||||||||||||||||||
| 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 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use POE::Component::IRC::Service::P10; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use POE::Component::IRC::Service::Hybrid; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use vars qw($VERSION); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 1 | $VERSION = '0.998'; | |||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 1 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=21.5
Pod
documented
| |||||||||||||||||||||||||||||
| 22 | 1 | my ($package,$alias,$ircdtype) = splice @_, 0, 3; | |||||||||||||||||||||||||||
| 23 | 1 | my $object; | |||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 1 | ▶ | unless ($alias and $ircdtype) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$alias and $ircdtype
MC/DC0%0/2
$alias and $ircdtype
$alias
$ircdtype
Truth table33%1/3
A and B
A= $aliasB= $ircdtype
| |||||||||||||||||||||||||||||
| 26 | 0 | croak "Not enough arguments to POE::Component::IRC::Service::new()"; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | SWITCH: { | ||||||||||||||||||||||||||||
| 30 | 1 | ▶ | if ($ircdtype =~ /^p10$/i) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 1 | $object = POE::Component::IRC::Service::P10->new($alias,@_); | |||||||||||||||||||||||||||
| 32 | 1 | last SWITCH; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | 0 | ▶ | if ($ircdtype =~ /^Hybrid$/i) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 0 | croak "Not implemented yet"; | |||||||||||||||||||||||||||
| 36 | 0 | $object = POE::Component::IRC::Service::Hybrid->new($alias,@_); | |||||||||||||||||||||||||||
| 37 | 0 | last SWITCH; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | 0 | croak "Don't know that IRCD type sorry"; | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | 1 | return $object; | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 1 | 1; | |||||||||||||||||||||||||||
| 45 | __END__ | ||||||||||||||||||||||||||||