Acme-CPANModules-Parse-UnixShellCommandLine
view release on metacpan or search on metacpan
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
{
"abstract" : "List of modules that parse command-line like Unix shells",
"author" : [
"perlancar <perlancar@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"class" : "Pod::Weaver::Section::Region",
"name" : "@Author::PERLANCAR/postlude",
"version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongComplete",
"name" : "@Author::PERLANCAR/Completion::GetoptLongComplete",
"version" : "0.08"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongSubcommand",
"name" : "@Author::PERLANCAR/Completion::GetoptLongSubcommand",
"version" : "0.04"
},
{
"class" : "Pod::Weaver::Section::Completion::GetoptLongMore",
"name" : "@Author::PERLANCAR/Completion::GetoptLongMore",
"version" : "0.001"
},
{
"class" : "Pod::Weaver::Section::Homepage::DefaultCPAN",
"name" : "@Author::PERLANCAR/Homepage::DefaultCPAN",
---
abstract: 'List of modules that parse command-line like Unix shells'
author:
- 'perlancar <perlancar@cpan.org>'
build_requires:
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Test::More: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
version: '4.019'
-
class: Pod::Weaver::Section::Region
name: '@Author::PERLANCAR/postlude'
version: '4.019'
-
class: Pod::Weaver::Section::Completion::GetoptLongComplete
name: '@Author::PERLANCAR/Completion::GetoptLongComplete'
version: '0.08'
-
class: Pod::Weaver::Section::Completion::GetoptLongSubcommand
name: '@Author::PERLANCAR/Completion::GetoptLongSubcommand'
version: '0.04'
-
class: Pod::Weaver::Section::Completion::GetoptLongMore
name: '@Author::PERLANCAR/Completion::GetoptLongMore'
version: '0.001'
-
class: Pod::Weaver::Section::Homepage::DefaultCPAN
name: '@Author::PERLANCAR/Homepage::DefaultCPAN'
version: '0.05'
-
Makefile.PL view on Meta::CPAN
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030.
use strict;
use warnings;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "List of modules that parse command-line like Unix shells",
"AUTHOR" => "perlancar <perlancar\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Acme-CPANModules-Parse-UnixShellCommandLine",
"LICENSE" => "perl",
"NAME" => "Acme::CPANModules::Parse::UnixShellCommandLine",
"PREREQ_PM" => {
"strict" => 0,
"warnings" => 0
NAME
Acme::CPANModules::Parse::UnixShellCommandLine - List of modules that
parse command-line like Unix shells
VERSION
This document describes version 0.003 of
Acme::CPANModules::Parse::UnixShellCommandLine (from Perl distribution
Acme-CPANModules-Parse-UnixShellCommandLine), released on 2023-10-31.
DESCRIPTION
Sometimes you need to parse a Unix shell command-line string, e.g. when
you want to break it into "words".
In general I recommend Text::ParseWords as it is a core module. If you
want a little more speed, try Parse::CommandLine::Regexp (see reference
to benchmark in See Also).
ACME::CPANMODULES ENTRIES
Complete::Bash
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
Its parse_cmdline() function can break a command-line string into
words. This function is geared for tab completion, so by default it
also breaks on some other word-breaking characters like "=", "@",
and so on. Probably not what you want generally, unless you are
working with tab completion.
Complete::Zsh
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
Complete::Fish
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
Complete::Tcsh
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
Text::ParseWords
Author: NEILB <https://metacpan.org/author/NEILB>
This core module can split string into words with customizable
quoting character and support for escaping using backslash. Its
shellwords() function is suitable for breaking command-line string
into words.
Parse::CommandLine
Author: SONGMU <https://metacpan.org/author/SONGMU>
Parse::CommandLine::Regexp
Author: PERLANCAR <https://metacpan.org/author/PERLANCAR>
FAQ
What is an Acme::CPANModules::* module?
or Acme::CM::Get:
% perl -MAcme::CM::Get=Parse::UnixShellCommandLine -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n
or directly:
% perl -MAcme::CPANModules::Parse::UnixShellCommandLine -E'say $_->{module} for @{ $Acme::CPANModules::Parse::UnixShellCommandLine::LIST->{entries} }' | cpanm -n
This Acme::CPANModules module also helps lcpan produce a more meaningful
result for "lcpan related-mods" command when it comes to finding related
modules for the modules listed in this Acme::CPANModules module. See
App::lcpan::Cmd::related_mods for more details on how "related modules"
are found.
HOMEPAGE
Please visit the project's homepage at
<https://metacpan.org/release/Acme-CPANModules-Parse-UnixShellCommandLin
e>.
SOURCE
lib/Acme/CPANModules/Parse/UnixShellCommandLine.pm view on Meta::CPAN
use strict;
use warnings;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-10-31'; # DATE
our $DIST = 'Acme-CPANModules-Parse-UnixShellCommandLine'; # DIST
our $VERSION = '0.003'; # VERSION
our $LIST = {
summary => "List of modules that parse command-line like Unix shells",
description => <<'_',
Sometimes you need to parse a Unix shell command-line string, e.g. when you want
to break it into "words".
In general I recommend <pm:Text::ParseWords> as it is a core module. If you want
a little more speed, try <pm:Parse::CommandLine::Regexp> (see reference to
benchmark in See Also).
_
entries => [
{
module=>'Complete::Bash',
description => <<'_',
Its `parse_cmdline()` function can break a command-line string into words. This
function is geared for tab completion, so by default it also breaks on some
other word-breaking characters like "=", "@", and so on. Probably not what you
want generally, unless you are working with tab completion.
_
},
{
module=>'Complete::Zsh',
},
{
lib/Acme/CPANModules/Parse/UnixShellCommandLine.pm view on Meta::CPAN
},
{
module=>'Complete::Tcsh',
},
{
module=>'Text::ParseWords',
description => <<'_',
This core module can split string into words with customizable quoting character
and support for escaping using backslash. Its `shellwords()` function is
suitable for breaking command-line string into words.
_
},
{
module=>'Parse::CommandLine',
},
{
module=>'Parse::CommandLine::Regexp',
},
],
};
1;
# ABSTRACT: List of modules that parse command-line like Unix shells
__END__
=pod
=encoding UTF-8
=head1 NAME
Acme::CPANModules::Parse::UnixShellCommandLine - List of modules that parse command-line like Unix shells
=head1 VERSION
This document describes version 0.003 of Acme::CPANModules::Parse::UnixShellCommandLine (from Perl distribution Acme-CPANModules-Parse-UnixShellCommandLine), released on 2023-10-31.
=head1 DESCRIPTION
Sometimes you need to parse a Unix shell command-line string, e.g. when you want
to break it into "words".
In general I recommend L<Text::ParseWords> as it is a core module. If you want
a little more speed, try L<Parse::CommandLine::Regexp> (see reference to
benchmark in See Also).
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<Complete::Bash>
Author: L<PERLANCAR|https://metacpan.org/author/PERLANCAR>
Its C<parse_cmdline()> function can break a command-line string into words. This
function is geared for tab completion, so by default it also breaks on some
other word-breaking characters like "=", "@", and so on. Probably not what you
want generally, unless you are working with tab completion.
=item L<Complete::Zsh>
Author: L<PERLANCAR|https://metacpan.org/author/PERLANCAR>
=item L<Complete::Fish>
lib/Acme/CPANModules/Parse/UnixShellCommandLine.pm view on Meta::CPAN
=item L<Complete::Tcsh>
Author: L<PERLANCAR|https://metacpan.org/author/PERLANCAR>
=item L<Text::ParseWords>
Author: L<NEILB|https://metacpan.org/author/NEILB>
This core module can split string into words with customizable quoting character
and support for escaping using backslash. Its C<shellwords()> function is
suitable for breaking command-line string into words.
=item L<Parse::CommandLine>
Author: L<SONGMU|https://metacpan.org/author/SONGMU>
=item L<Parse::CommandLine::Regexp>
Author: L<PERLANCAR|https://metacpan.org/author/PERLANCAR>
lib/Acme/CPANModules/Parse/UnixShellCommandLine.pm view on Meta::CPAN
or L<Acme::CM::Get>:
% perl -MAcme::CM::Get=Parse::UnixShellCommandLine -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n
or directly:
% perl -MAcme::CPANModules::Parse::UnixShellCommandLine -E'say $_->{module} for @{ $Acme::CPANModules::Parse::UnixShellCommandLine::LIST->{entries} }' | cpanm -n
This Acme::CPANModules module also helps L<lcpan> produce a more meaningful
result for C<lcpan related-mods> command when it comes to finding related
modules for the modules listed in this Acme::CPANModules module.
See L<App::lcpan::Cmd::related_mods> for more details on how "related modules"
are found.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/Acme-CPANModules-Parse-UnixShellCommandLine>.
=head1 SOURCE
t/00-compile.t view on Meta::CPAN
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
( run in 1.242 second using v1.01-cache-2.11-cpan-fe3c2283af0 )