GX::Callback::Hook::Queue

Module Version: 0.2000_01

NAME

GX::Callback::Hook::Queue - Callback queue class

SYNOPSIS

None.

DESCRIPTION

This module provides the GX::Callback::Hook::Queue class.

METHODS

Constructor

new

Returns a new GX::Callback::Hook::Queue object.

$queue = GX::Callback::Hook::Queue->new;
Returns:

Public Methods

add

Adds the given callback objects / the callback objects attached to the given hook objects to the queue.

$queue->add( @arguments );
Arguments:
Exceptions:

all

Returns all queued callback objects.

@callbacks = $queue->all;
Returns:

Calling this method does not modify the queue.

clear

Clears the queue.

$queue->clear;

clone

Clones the queue.

$cloned_queue = $queue->clone;
Returns:

current

Returns the current callback object (i.e. the one returned by the last next() call).

$callback = $queue->current;
Returns:

current_hook

Returns the hook object the current callback is associated with.

$hook = $queue->current_hook;
Returns:

next

Removes the next callback object from the queue and returns it.

$callback = $queue->next;
Returns:

remove

Removes the given callback object(s) / the callback objects associated with the specified hook(s) from the queue.

$result = $queue->remove( @arguments );
Arguments:
Returns:
  • $result ( integer )
Exceptions:

remove_all

Removes all remaining callback objects from the queue.

$queue->remove_all;

replace_all

Replaces the remaining callback objects with the given callback object(s) / the callback objects attached to the given hook object(s).

$queue->replace_all( @arguments );
Arguments:
Exceptions:

skip_to

Skips all remaining callbacks up to the specified callback / the next callback associated with the specified hook.

$result = $queue->skip_to( $argument );
Arguments:
Returns:
  • $result ( bool )
Exceptions:

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.