App-PMUtils
view release on metacpan or search on metacpan
script/pwd2mod view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-08-30'; # DATE
our $DIST = 'App-PMUtils'; # DIST
our $VERSION = '0.745'; # VERSION
our %SPEC;
$SPEC{pwd2mod} = {
v => 1.1,
summary => 'Try to guess/extract module name from current directory',
description => <<'_',
Will return `.` if module name cannot be guessed.
_
args => {
},
result_naked => 1,
};
sub pwd2mod {
my %args = @_;
my $cwd = $ENV{PWD} // do { require Cwd; Cwd::cwd() };
script/pwd2mod view on Meta::CPAN
$cwd =~ s/-/::/g;
$cwd;
}
Perinci::CmdLine::Any->new(
url => "/main/pwd2mod",
read_config => 0,
read_env => 0,
)->run;
# ABSTRACT: Try to guess/extract module name from current directory
# PODNAME: pwd2mod
__END__
=pod
=encoding UTF-8
=head1 NAME
pwd2mod - Try to guess/extract module name from current directory
=head1 VERSION
This document describes version 0.745 of pwd2mod (from Perl distribution App-PMUtils), released on 2024-08-30.
=head1 SYNOPSIS
% pwd
/home/ujang/proj/perl-Foo-Bar
script/pwd2mod view on Meta::CPAN
% cd
% pwd
/home/ujang
% pwd2mod
.
=head1 DESCRIPTION
Will return C<.> if module name cannot be guessed.
=head1 OPTIONS
C<*> marks required options.
=head2 Output options
=over
=item B<--format>=I<s>
( run in 0.797 second using v1.01-cache-2.11-cpan-748bfb374f4 )