use Proc::Background; # Make sure it's loaded at compile-time package Proc::Background; no warnings 'redefine'; sub new { do_stubby_stuff(@_) } package main; # Go about your testing business