| 1 | package POE::Component::IRC::Constants; | ||
| 2 | 79 | our $AUTHORITY = 'cpan:HINRIK'; | |
| 3 | 79 | $POE::Component::IRC::Constants::VERSION = '6.92'; | |
| 4 | 79 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 79 | ▶ | use warnings FATAL => 'all'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 79 | require Exporter; | |
| 8 | 79 | ▶ | use base qw(Exporter); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 79 | our @EXPORT_OK = qw( | |
| 10 | PCI_REFCOUNT_TAG PRI_LOGIN PRI_HIGH PRI_NORMAL MSG_PRI MSG_TEXT | ||
| 11 | CMD_PRI CMD_SUB | ||
| 12 | ); | ||
| 13 | 79 | our %EXPORT_TAGS = ( ALL => [@EXPORT_OK] ); | |
| 14 | |||
| 15 | use constant { | ||
| 16 | # The name of the reference count P::C::I keeps in client sessions. | ||
| 17 | 79 | PCI_REFCOUNT_TAG => 'P::C::I registered', | |
| 18 | |||
| 19 | # Message priorities. | ||
| 20 | PRI_LOGIN => 10, # PASS/NICK/USER messages must go first. | ||
| 21 | PRI_HIGH => 20, # KICK/MODE etc. is more important than chatter. | ||
| 22 | PRI_NORMAL => 30, # Random chatter. | ||
| 23 | |||
| 24 | MSG_PRI => 0, # Queued message priority. | ||
| 25 | MSG_TEXT => 1, # Queued message text. | ||
| 26 | |||
| 27 | # RCC: Since most of the commands are data driven, I have moved their | ||
| 28 | # event/handler maps here and added priorities for each data driven | ||
| 29 | # command. The priorities determine message importance when messages | ||
| 30 | # are queued up. Lower ones get sent first. | ||
| 31 | CMD_PRI => 0, # Command priority. | ||
| 32 | CMD_SUB => 1, # Command handler. | ||
| 33 | 79 | ▶ | }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | |||
| 35 | 79 | 1; | |
| 36 | |||
| 37 | =encoding utf8 | ||
| 38 | |||
| 39 | =head1 NAME | ||
| 40 | |||
| 41 | POE::Component::IRC::Constants - Defines constants required by | ||
| 42 | L<POE::Component::IRC|POE::Component::IRC> | ||
| 43 | |||
| 44 | =head1 SYNOPSIS | ||
| 45 | |||
| 46 | use POE::Component::IRC::Constants qw(:ALL); | ||
| 47 | |||
| 48 | =head1 DESCRIPTION | ||
| 49 | |||
| 50 | POE::Component::IRC::Constants defines constants required by | ||
| 51 | L<POE::Component::IRC|POE::Component::IRC> and derived sub-classes. | ||
| 52 | |||
| 53 | =head1 AUTHOR | ||
| 54 | |||
| 55 | Chris Williams <chris@bingosnet.co.uk> | ||
| 56 | |||
| 57 | =head1 SEE ALSO | ||
| 58 | |||
| 59 | L<POE::Component::IRC|POE::Component::IRC> | ||
| 60 | |||
| 61 | =cut | ||