1 # NOTE: Derived from lib/Getopt/Long.pm.
2 # Changes made here will be lost when autosplit again.
6 #line 921 "lib/Getopt/Long.pm (autosplit into lib/auto/Getopt/Long/Configure.al)"
7 # Getopt::Long Configuration.
12 [ $error, $debug, $major_version, $minor_version,
13 $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
14 $gnu_compat, $passthrough, $genprefix ];
16 if ( ref($options[0]) eq 'ARRAY' ) {
17 ( $error, $debug, $major_version, $minor_version,
18 $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
19 $gnu_compat, $passthrough, $genprefix ) = @{shift(@options)};
23 foreach $opt ( @options ) {
26 if ( $try =~ /^no_?(.*)$/s ) {
30 if ( ($try eq 'default' or $try eq 'defaults') && $action ) {
33 elsif ( ($try eq 'posix_default' or $try eq 'posix_defaults') ) {
34 local $ENV{POSIXLY_CORRECT};
35 $ENV{POSIXLY_CORRECT} = 1 if $action;
38 elsif ( $try eq 'auto_abbrev' or $try eq 'autoabbrev' ) {
39 $autoabbrev = $action;
41 elsif ( $try eq 'getopt_compat' ) {
42 $getopt_compat = $action;
44 elsif ( $try eq 'gnu_getopt' ) {
52 elsif ( $try eq 'gnu_compat' ) {
53 $gnu_compat = $action;
55 elsif ( $try eq 'ignorecase' or $try eq 'ignore_case' ) {
56 $ignorecase = $action;
58 elsif ( $try eq 'ignore_case_always' ) {
59 $ignorecase = $action ? 2 : 0;
61 elsif ( $try eq 'bundling' ) {
64 elsif ( $try eq 'bundling_override' ) {
65 $bundling = $action ? 2 : 0;
67 elsif ( $try eq 'require_order' ) {
68 $order = $action ? $REQUIRE_ORDER : $PERMUTE;
70 elsif ( $try eq 'permute' ) {
71 $order = $action ? $PERMUTE : $REQUIRE_ORDER;
73 elsif ( $try eq 'pass_through' or $try eq 'passthrough' ) {
74 $passthrough = $action;
76 elsif ( $try =~ /^prefix=(.+)$/ && $action ) {
78 # Turn into regexp. Needs to be parenthesized!
79 $genprefix = "(" . quotemeta($genprefix) . ")";
80 eval { '' =~ /$genprefix/; };
81 Croak ("Getopt::Long: invalid pattern \"$genprefix\"") if $@;
83 elsif ( $try =~ /^prefix_pattern=(.+)$/ && $action ) {
85 # Parenthesize if needed.
86 $genprefix = "(" . $genprefix . ")"
87 unless $genprefix =~ /^\(.*\)$/;
88 eval { '' =~ /$genprefix/; };
89 Croak ("Getopt::Long: invalid pattern \"$genprefix\"") if $@;
91 elsif ( $try eq 'debug' ) {
95 Croak ("Getopt::Long: unknown config parameter \"$opt\"")
101 # end of Getopt::Long::Configure