TOC/Config.pm

filter: Statementstmt 78.7% 26 / 33 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 1 totaltotal 68.0% 34 / 50 CC 4 SCAR 19.9
CC
4
Cov
67%
EVENT_ERROR_STRING
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.3
« TOC.pm ↑ Summary
1 package Net::AIM::TOC::Config;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use constant DEBUG => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use constant REMOVE_HTML_TAGS => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use constant AUTH_SERVER => 'login.oscar.aol.com';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use constant AUTH_PORT => 5159;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use constant TOC_SERVER => 'toc.oscar.aol.com';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use constant TOC_PORT => 9898;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶use constant AGENT => 'Net::AIM::TOC';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 my $error_lookup = {
16 901 => '%s not currently available',
17 902 => 'Warning of %s not currently available',
18 903 => 'A message has been dropped, you are exceeding the server speed limit',
19 # * Chat Errors *',
20 950 => 'Chat in %s is unavailable.',
21  
22 # * IM & Info Errors *',
23 960 => 'You are sending message too fast to %s',
24 961 => 'You missed an im from %s because it was too big.',
25 962 => 'You missed an im from %s because it was sent too fast.',
26
27 # * Dir Errors *',
28 970 => 'Failure',
29 971 => 'Too many matches',
30 972 => 'Need more qualifiers',
31 973 => 'Dir service temporarily unavailable',
32 974 => 'Email lookup restricted',
33 975 => 'Keyword Ignored',
34 976 => 'No Keywords',
35 977 => 'Language not supported',
36 978 => 'Country not supported',
37 979 => 'Failure unknown %s',
38
39 # * Auth errors *',
40 980 => 'Incorrect nickname or password.',
41 981 => 'The service is temporarily unavailable.',
42 982 => 'Your warning level is currently too high to sign on.',
43 983 => 'You have been connecting and disconnecting too frequently. Wait 10 minutes and try again. If you continue to try, you will need to wait even longer.',
44 989 => 'An unknown signon error has occurred %s'
45 };
46  
47  
48 0 ▶sub EVENT_ERROR_STRING {
Subroutine EVENT_ERROR_STRING: not called CC=4 SCAR=30.0
Pod undocumented
49 0 my $error = shift;
50 0 ▶ my $extra = shift || undef;
Condition0%0/2
shift() || undef
l!l
00
MC/DC0%0/1
shift() || undef
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
51  
52 0 ▶ if( defined($error_lookup->{$error}) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $error_lookup->{$error}) 0 0 0
53 0 ▶ if( defined($extra) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $extra) { } 0 0 0
54 0 return( sprintf($error_lookup->{$error}, $extra) );
55 }
56 else {
57 0 return( $error_lookup->{$error} );
58 };
59 }
60  
61 0 return( "Event error undefined: $error" );
62 };
63  
64  
65 1 1;
66  
« TOC.pm ↑ Summary