package Callback; use 5.010000; use threads; use threads::shared; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); our $VERSION = '0.01'; require XSLoader; XSLoader::load('Callback', $VERSION); my $callback_ref; sub new($$) { my $invocant = shift; $callback_ref = shift; $invocant = ref $invocant if ref $invocant; my $self = &share({}); return bless $self, $invocant; } sub run($) { my $self = shift; my $param = shift; runCallback($callback_ref, $param); } 1;