sub RemoveThing { my $thingid = shift(); # QueueAction serializes it's first argument QueueAction(\&Handlers::thing_remove()) } package Handlers; sub thing_remove { database foo to remove $thingid; }