$ h2xs -AX Foo::Bar
####
Foo/Bar/Makefile.PL
Foo/Bar/Bar.pm
Foo/Bar/Changes
Foo/Bar/test.pl
Foo/Bar/MANIFEST
Foo/Bar/README
##
##
$ mv Bar Foo-Bar-0.01
##
##
'NAME' => 'Bar'
# but you need
'NAME' => 'Foo::Bar'
# so fix it!
##
##
Foo-Bar-0.01/Bar.pm
Foo-Bar-0.01/Makefile.PL
Foo-Bar-0.01/MANIFEST
Foo-Bar-0.01/Changes
Foo-Bar-0.01/test.pl
Foo-Bar-0.01/README
##
##
Foo::Bar # will install in Foo/Bar.pm
Foo::Bar::Baz # will install in Foo/Bar/Baz.pm
##
##
Foo-Bar-0.01/Bar.pm
Foo-Bar-0.01/Makefile.PL
Foo-Bar-0.01/MANIFEST
Foo-Bar-0.01/Changes
Foo-Bar-0.01/test.pl
Foo-Bar-0.01/README
Foo-Bar-0.01/Bar/Baz.pm
# in Bar.pm
package Foo::Bar;
# in Baz.pm
package Foo::Bar::Baz;
# in Makefile.PL
WriteMakefile(
'NAME' => 'Foo::Bar',
##
##
$ cd Foo-Bar-0.01
$ mkdir Bar
$ cp Bar.pm ./Bar/Baz.pm
$ cd Bar
$ perl -pi.bak -e 's/Foo::Bar/Foo::Bar::Baz/g' Baz.pm
$ rm Baz.pm.bak
##
##
module-starter --module=Foo::Bar,Foo::Bat \
--author="Andy Lester" --email=andy@petdance.com
##
##
use Test;
BEGIN { plan tests => 42 }
use Widget;
ok(1) # module loaded OK
my $w = new Widget;
$reply = $w->method;
@reply = $w->method;
ok( $reply );
ok( @reply );
ok( $reply =~ m/something/ );
ok( $reply eq 'some string' );
ok( scalar @reply == 42 );
ok( join '', @reply eq 'some list of stuff' );
##
##
Foo-Bar-0.01/t/some_test.t
Foo-Bar-0.01/t/test_this.t
Foo-Bar-0.01/t/test_that.t
##
##
$ cd Foo-Bar-0.01
$ md t
$ cp test.pl ./t/some_test.t
$ cp test.pl ./t/other_test.t
$ rm test.pl
##
##
$ tar -czf Foo-Bar-0.01.tar.gz Foo-Bar-0.01
# using CYGWIN you need to do it in two steps as the tar -z
# option (which uses the tar gzip) produces broken distros
# at least with my version of CYGWIN
$ tar -cf Foo-Bar-0.01.tar Foo-Bar-0.01
$ gzip Foo-Bar-0.01.tar
##
##
$ tar -xzvf Foo-Bar-0.01.tar.gz
$ cd Foo-Bar-0.01
$ perl Makefile.PL
$ make
$ make test
$ make install