use My::Actions; my $object = My::Actions->factory($act); $object->do_stuff;