名前¶
Getopt::Long::Parser - Getopt::Long object-oriented interface
Getopt::Long::Parser - Getopt::Long オブジェクト指向インタフェース
(訳注: (TBR)がついている段落は「みんなの自動翻訳@TexTra」による 機械翻訳です。)
概要¶
use Getopt::Long::Parser;
my $p = Getopt::Long::Parser->new;
$p->configure( %options );
if ( $p->getoptions( @options ) ) { ... }
if ( $p->getoptionsfromarray( \@array, @options ) ) { ... }
Configuration options can be passed to the constructor:
構成オプションをコンストラクタに渡すことができます。 (TBR)
my $p = Getopt::Long::Parser->new( config => [ %options ] );
説明¶
Getopt::Long::Parser is an object-oriented interface to Getopt::Long. See its documentation for configuration and use.
Getopt::Long::Parserは、Getopt::Longへのオブジェクト指向インタフェースです。 構成と使用方法については、文書を参照してください。 (TBR)
Note that Getopt::Long and Getopt::Long::Parser are not object-oriented. Getopt::Long::Parser emulates an object-oriented interface, which should be okay for most purposes.
Getopt::LongとGetopt::Long::Parserはオブジェクト指向ではないことに注意してください。 Getopt::Long::Parserはオブジェクト指向インターフェースをエミュレートしますが、ほとんどの目的には問題ありません。 (TBR)
CONSTRUCTOR¶
my $p = Getopt::Long::Parser->new( %options );
The constructor takes an optional hash with parameters.
コンストラクタは、パラメータとともにオプションのハッシュを取ります。 (TBR)
- config
-
An array reference with configuration settings. See "Configuring Getopt::Long" in Getopt::Long for all possible settings.
構成設定を含む配列参照。 可能なすべての設定については、"Configuring Getopt::Long" in Getopt::Longを参照してください。 (TBR)
メソッド¶
In the examples, $p is assumed to be the result of a call to the constructor.
例では、$pはコンストラクターの呼び出しの結果であると想定されています。 (TBR)
configure¶
$p->configure( %settings );
Update the current config settings. See "Configuring Getopt::Long" in Getopt::Long for all possible settings.
現在の構成設定を更新します。 可能なすべての設定については、"Configuring Getopt::Long" in Getopt::Longを参照してください。 (TBR)
getoptionsfromarray¶
my $res = $p->getoptionsfromarray( $aref, @opts );
getoptions¶
my $res = $p->getoptions( @opts );
The same as getoptionsfromarray( \@ARGV, @opts ).
getoptionsfromarray( \@ARGV, @opts )と同じです。 (TBR)
SEE ALSO¶
作者¶
Johan Vromans <jvromans@squirrel.nl>
COPYRIGHT AND DISCLAIMER¶
This program is Copyright 1990,2015,2023 by Johan Vromans. This program is free software; you can redistribute it and/or modify it under the same terms as Perl.
このプログラムは、Johan VromansによってCopyright 1990,2015,2023で保護されています。 このプログラムはフリーソフトウェアです。 Perlと同じ条件で再配布および/または変更できます。 (TBR)