Template-Plugin-Java
view release on metacpan or search on metacpan
lib/Template/Plugin/Java/Utils.pm view on Meta::CPAN
return "";
}
=item B<determinePackage([ optional directory ])>
Determine the package of the current or passed-in directory.
=cut
sub determinePackage (;$) {
my $dir = shift || ".";
my @cwd = split m|/|, substr ( simplifyPath $dir, 1 );
my $i = @cwd;
while ($i--) {
my $package = join ('.', @cwd[$i..$#cwd]);
if (findPackageDir $package) {
return $package;
}
}
( run in 0.848 second using v1.01-cache-2.11-cpan-71847e10f99 )