View | Details | Raw Unified | Return to bug 13937
Collapse All | Expand All

(-)a/misc/z3950_responder.pl (-9 / +15 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use Carp;
23
use Getopt::Long;
23
use Getopt::Long qw(:config no_ignore_case);
24
use Pod::Usage;
24
use Pod::Usage;
25
25
26
use C4::Context;
26
use C4::Context;
Lines 102-111 my @yaz_options; Link Here
102
102
103
sub add_yaz_option {
103
sub add_yaz_option {
104
    my ( $opt_name, $opt_value ) = @_;
104
    my ( $opt_name, $opt_value ) = @_;
105
    warn "name: $opt_name and value: $opt_value";
105
106
106
    push @yaz_options, "-$opt_name", "$opt_value";
107
    push @yaz_options, "-$opt_name", "$opt_value";
107
}
108
}
108
109
110
sub pass_yaz_option {
111
    my ( $opt_name ) = @_;
112
113
    push @yaz_options, "-$opt_name";
114
}
115
109
GetOptions(
116
GetOptions(
110
    '-h|help' => \$help,
117
    '-h|help' => \$help,
111
    '--man' => \$man,
118
    '--man' => \$man,
Lines 126-138 GetOptions( Link Here
126
    'C=s' => \&add_yaz_option,
133
    'C=s' => \&add_yaz_option,
127
    'm=s' => \&add_yaz_option,
134
    'm=s' => \&add_yaz_option,
128
    'w=s' => \&add_yaz_option,
135
    'w=s' => \&add_yaz_option,
129
    'z' => \&add_yaz_option,
136
    'z' => \&pass_yaz_option,
130
    'K' => \&add_yaz_option,
137
    'K' => \&pass_yaz_option,
131
    'i' => \&add_yaz_option,
138
    'i' => \&pass_yaz_option,
132
    'D' => \&add_yaz_option,
139
    'D' => \&pass_yaz_option,
133
    'S' => \&add_yaz_option,
140
    'S' => \&pass_yaz_option,
134
    'T' => \&add_yaz_option,
141
    'T' => \&pass_yaz_option,
135
    '1' => \&add_yaz_option
142
    '1' => \&pass_yaz_option
136
) || pod2usage(2);
143
) || pod2usage(2);
137
144
138
pod2usage(1) if $help;
145
pod2usage(1) if $help;
139
- 

Return to bug 13937