refactor default config generation to a separate method

See tobyink/p5-pry#1.