I always use
h2xs to generate my module
templates. It comes with perl and is easy to use. The
module templates it builds have all the necessary
pieces in-place so you don't have to worry
about doing it yourself; all you have to do is drop
in your code. Also, the templates produced by h2xs
are all ready for a
CPAN
style "perl Makefile.PL/make/make test/make install" install
(supports "make tardist" for building distributable bundles too):
% h2xs -A -X -n Foo::DoIt