line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IRC::Toolkit; |
2
|
|
|
|
|
|
|
$IRC::Toolkit::VERSION = '0.091001'; |
3
|
2
|
|
|
2
|
|
31904
|
use strictures 2; |
|
2
|
|
|
|
|
2486
|
|
|
2
|
|
|
|
|
80
|
|
4
|
2
|
|
|
2
|
|
460
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
488
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
## Core bits can be added to this list ... |
7
|
|
|
|
|
|
|
## ... but removing modules will break stuff downstream |
8
|
|
|
|
|
|
|
my @modules = qw/ |
9
|
|
|
|
|
|
|
Case |
10
|
|
|
|
|
|
|
Colors |
11
|
|
|
|
|
|
|
CTCP |
12
|
|
|
|
|
|
|
ISupport |
13
|
|
|
|
|
|
|
Masks |
14
|
|
|
|
|
|
|
Modes |
15
|
|
|
|
|
|
|
Parser |
16
|
|
|
|
|
|
|
/; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import { |
19
|
3
|
|
|
3
|
|
3431
|
my ($self, @load) = @_; |
20
|
3
|
100
|
|
|
|
11
|
@load = @modules unless @load; |
21
|
3
|
|
|
|
|
6
|
my $pkg = caller; |
22
|
3
|
|
|
|
|
4
|
my @failed; |
23
|
3
|
|
|
|
|
4
|
for my $mod (@load) { |
24
|
12
|
|
|
|
|
36
|
my $ld = "package $pkg; use IRC::Toolkit::$mod; 1;"; |
25
|
2
|
100
|
33
|
2
|
|
693
|
eval $ld and not $@ or warn "$@\n" and push @failed, $mod; |
|
2
|
|
66
|
2
|
|
4
|
|
|
2
|
|
|
2
|
|
19
|
|
|
2
|
|
|
2
|
|
751
|
|
|
2
|
|
|
2
|
|
3
|
|
|
2
|
|
|
1
|
|
17
|
|
|
2
|
|
|
1
|
|
393
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
23
|
|
|
2
|
|
|
|
|
1170
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
25
|
|
|
2
|
|
|
|
|
877
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
560
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
562
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
|
12
|
|
|
|
|
867
|
|
26
|
|
|
|
|
|
|
} |
27
|
3
|
100
|
|
|
|
206
|
confess "Failed to import ".join ' ', @failed if @failed; |
28
|
2
|
|
|
|
|
30
|
1 |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
print |
32
|
|
|
|
|
|
|
qq[ #otw also known as the "Welcome To Every Watchlist Channel"\n], |
33
|
|
|
|
|
|
|
qq[ #otw: On The Watchlist\n] |
34
|
|
|
|
|
|
|
unless caller; 1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
IRC::Toolkit - Useful IRC objects and utilities |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
## Import the most commonly used Tookit:: modules |
46
|
|
|
|
|
|
|
## (Case, Colors, CTCP, ISupport, Masks, Modes, Parser) |
47
|
|
|
|
|
|
|
use IRC::Toolkit; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
## Import a list of modules: |
50
|
|
|
|
|
|
|
use IRC::Toolkit qw/ |
51
|
|
|
|
|
|
|
CTCP |
52
|
|
|
|
|
|
|
Masks |
53
|
|
|
|
|
|
|
Modes |
54
|
|
|
|
|
|
|
Numerics |
55
|
|
|
|
|
|
|
/; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
## ... or individually: |
58
|
|
|
|
|
|
|
use IRC::Toolkit::Numerics; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
A collection of useful IRC-related utilities. See their respective |
63
|
|
|
|
|
|
|
documentation, below. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Modules that export functions use L, which is quite flexible; |
66
|
|
|
|
|
|
|
see the L docs for details. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
L; Objects representing incoming or outgoing IRC events |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L; Objects representing a single mode change |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L; Objects representing a set of mode changes |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L; RFC-compliant case folding tools |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L; Color/format code interpolation & removal |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L; CTCP quoting and extraction tools |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L; ISUPPORT (numeric 005) parser |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L; Hostmask parsing and matching tools |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L; Mode-line parsing tools |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L; IRC numerics translation to/from RPL or ERR names |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L; Functional interface to L |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L; Produce sequential TS6 IDs |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
L; A Role for classes that track IRC casemapping |
93
|
|
|
|
|
|
|
settings |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SEE ALSO |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 AUTHOR |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Jon Portnoy |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Portions of code are derived from L, L, and |
106
|
|
|
|
|
|
|
L, which are copyright their respective authors; |
107
|
|
|
|
|
|
|
these items are documented where they are found. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Licensed under the same terms as Perl. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|