Help language development. Donate to The Perl Foundation

Getopt::Advance cpan:ALOREN last updated on 2022-09-09

Getopt-Advance-1.2.0/

Build
Status Windows Build
Status

An advance command line parse tool replace Getopt::Kinoko

Description

Getopt::Advance is a powerful command line option parsing module, it suppot many style such as: unix-stylegnu-stylebsd-style.etc. It support HashArray option compared to traditional command line tools. In addition, it also support radiomulti group mechanism which can manage option realtionship. And to handle non-option argument, it provide mainpos and cmd feature.

Usage

Try it

Normal version

``` raku use Getopt::Advance;

my OptionSet $os .= new();

$os.push( "h|help=b", "print help message.", callback => sub ($, $) { say "The h option is set by user"; });

&getopt($os); say "Exit!";

### With react

``` raku
use Getopt::Advance;

my OptionSet $os .= new();

$os.push("h|help=b", "print help message.");

react {
    whenever $os.Supply("h") {
        say "The h option is set by user";
    }
    whenever &getopt($os) {
        say "Exit!";
        done;
    }
}

Feature

The feature support by this module, more information please refer documents.

Document

Getopt-Advance

Example

App::snippet

Run your c/c++ code.

App::FindSource

Find your source file easily!

xcp

A script display the copy progress.

pdnf

pdnf added some sort command to dnf(package manager of some linux distribution).

find-file

find-file

usage

**help**

``` shell $ ./find-file.p6 Usage: ./sample/find-file.p6 [directory] OPTIONs

-d specify file type to directory

-v|--version print program version.

--size= the minimum size limit of file.

-? same as -h.

-h|--help print this help.

-f specify file type to normal file

-l specify file type to symlink

<div class="formalpara-title">

**find**

</div>

``` shell
$ ./find-file.p6 ../t '1\d.*t$'
../t/11-bsd-style.t
../t/10-x-style.t

Installation

Lincese

The MIT License (MIT).

TODO