# -----------------------------------------------------------------------------
# Author(s)	:	Bill Atkins
# Title		:	MOS hook info
# Date		:	1.22.02
# Desc		:	tracks information about registered hooks
# Notes		:	for more information see the plugin documentation
# License	:	under the same terms as mos.pl
# -----------------------------------------------------------------------------

package Milkbone::HookEntry;

use strict;
use warnings;

require Exporter;

our @ISA = qw( Exporter );
our @EXPORT = qw( );
our @EXPORT_OK = qw( );

sub new 
{
	my $self = {};
	my $class = shift;
	bless $self, $class;

	my ($hook_name, $callback, $args, $package) = @_;

	$self->{hook_name} = $hook_name;
	$self->{callback} = $callback;
	$self->{args} = $args;
	$self->{package} = $package;

	return $self;
}

sub call
{
	my ($self, %args) = @_;

	$self->{callback}->(%args, %{$self->{args}});
}

1;