NAME

IRC::Mode::Single - A single IRC mode change

SYNOPSIS

my $mode = IRC::Mode::Single->new(
  '+', 'o', 'avenj'
);

my $flag = $mode->flag;
my $mode = $mode->char;
my $arg  = $mode->param;

DESCRIPTION

A simple ARRAY-type object representing a single mode change. These objects stringify into an IRC mode string.

Can be used to turn "mode_to_array" in IRC::Toolkit::Modes mode ARRAYs into objects:

for my $mset (@$mode_array) {
  my $this_mode = IRC::Mode::Single->new( @$mset );
  . . .
}

Also see IRC::Mode::Set

new

Constructs a new mode change; expects at least a flag and mode.

char

The mode character.

flag

The '-' or '+' flag for this mode change.

param

The parameter attached to the mode, if any.

as_string

Produces a mode string (with params attached) for this single mode change.

export

Retrieve the backing ARRAY without bless/overload magic.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>