NAME

Baz::Bar

sub myFunction {', '', "Podheader", "Foo::Bar");

testPOD('#test package Foo::Bar ', '=head1 NAME\s+Foo', "Podheader", "Foo::Bar");

testPOD('#test

# test package Foo::Bar ', '=head1 NAME\s+Foo', "Podheader", "Foo::Bar");

sub testPOD { my ($file, $match, $desc, $package) = @_;

my $pm = App::CommentToPod->new;
$pm->addPod($file);

ok $pm->package eq $package, "Found correct package name: $package (got " . $pm->package . ")";

if ($pm->podfile =~ m/$match/) {
	ok 1, $desc;
	return;
}
ok 0, "test failed. expected to find; '$match' in :" . $pm->podfile;
}

done_testing;