#!/usr/bin/perl
use
strict;
use
Cwd;
STDERR usage() and
exit
if
$opt_h
;
find_project_name();
sub
usage {
qq{$0 - get name of project
}
;
}
sub
find_project_name {
my
$abs
=
$ARGV
[0] || cwd();
$abs
= Cwd::abs_path(
$abs
) or
die
;
-f
"$abs/Makefile.PL"
or
die
(
"no Makefile.PL in $abs"
);
$abs
=~/([^\/]+)$/;
my
$pname
= $1;
$pname
=~s/\-/::/g;
return
$pname
;
}