mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 20:42:38 +01:00
Plugins: fix getopt configuration
This commit is contained in:
parent
cb0b39a0e5
commit
99a3266106
@ -14,7 +14,6 @@ use warnings; use strict;
|
|||||||
use feature 'unicode_strings';
|
use feature 'unicode_strings';
|
||||||
|
|
||||||
use Getopt::Long qw(GetOptionsFromString);
|
use Getopt::Long qw(GetOptionsFromString);
|
||||||
Getopt::Long::Configure("bundling");
|
|
||||||
|
|
||||||
sub initialize {
|
sub initialize {
|
||||||
my ($self, %conf) = @_;
|
my ($self, %conf) = @_;
|
||||||
@ -36,6 +35,8 @@ sub datecmd {
|
|||||||
chomp $getopt_error;
|
chomp $getopt_error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Getopt::Long::Configure("bundling");
|
||||||
|
|
||||||
my ($user_override, $show_usage);
|
my ($user_override, $show_usage);
|
||||||
my ($ret, $args) = GetOptionsFromString($arguments,
|
my ($ret, $args) = GetOptionsFromString($arguments,
|
||||||
'u=s' => \$user_override,
|
'u=s' => \$user_override,
|
||||||
|
@ -15,7 +15,6 @@ use DBI;
|
|||||||
use Time::Duration qw/concise duration/;
|
use Time::Duration qw/concise duration/;
|
||||||
use Time::HiRes qw/gettimeofday/;
|
use Time::HiRes qw/gettimeofday/;
|
||||||
use Getopt::Long qw(GetOptionsFromString);
|
use Getopt::Long qw(GetOptionsFromString);
|
||||||
Getopt::Long::Configure ("bundling");
|
|
||||||
|
|
||||||
sub initialize {
|
sub initialize {
|
||||||
my ($self, %conf) = @_;
|
my ($self, %conf) = @_;
|
||||||
@ -189,6 +188,8 @@ sub remindme {
|
|||||||
chomp $getopt_error;
|
chomp $getopt_error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Getopt::Long::Configure ("bundling");
|
||||||
|
|
||||||
$arguments =~ s/(?<!\\)'/\\'/g;
|
$arguments =~ s/(?<!\\)'/\\'/g;
|
||||||
my ($ret, $args) = GetOptionsFromString($arguments,
|
my ($ret, $args) = GetOptionsFromString($arguments,
|
||||||
'r:i' => \$repeat,
|
'r:i' => \$repeat,
|
||||||
|
@ -16,7 +16,6 @@ use feature 'unicode_strings';
|
|||||||
use PBot::Utils::LWPUserAgentCached;
|
use PBot::Utils::LWPUserAgentCached;
|
||||||
use XML::LibXML;
|
use XML::LibXML;
|
||||||
use Getopt::Long qw(GetOptionsFromString);
|
use Getopt::Long qw(GetOptionsFromString);
|
||||||
Getopt::Long::Configure("bundling");
|
|
||||||
|
|
||||||
sub initialize {
|
sub initialize {
|
||||||
my ($self, %conf) = @_;
|
my ($self, %conf) = @_;
|
||||||
@ -37,6 +36,8 @@ sub weathercmd {
|
|||||||
chomp $getopt_error;
|
chomp $getopt_error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Getopt::Long::Configure("bundling");
|
||||||
|
|
||||||
my ($user_override, $show_usage);
|
my ($user_override, $show_usage);
|
||||||
my ($ret, $args) = GetOptionsFromString($arguments,
|
my ($ret, $args) = GetOptionsFromString($arguments,
|
||||||
'u=s' => \$user_override,
|
'u=s' => \$user_override,
|
||||||
|
@ -21,7 +21,6 @@ use PBot::Utils::LWPUserAgentCached;
|
|||||||
use JSON;
|
use JSON;
|
||||||
use URI::Escape qw/uri_escape_utf8/;
|
use URI::Escape qw/uri_escape_utf8/;
|
||||||
use Getopt::Long qw(GetOptionsFromString);
|
use Getopt::Long qw(GetOptionsFromString);
|
||||||
Getopt::Long::Configure("bundling_override", "ignorecase_always");
|
|
||||||
|
|
||||||
sub initialize {
|
sub initialize {
|
||||||
my ($self, %conf) = @_;
|
my ($self, %conf) = @_;
|
||||||
@ -63,6 +62,8 @@ sub wttrcmd {
|
|||||||
chomp $getopt_error;
|
chomp $getopt_error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Getopt::Long::Configure("bundling_override", "ignorecase_always");
|
||||||
|
|
||||||
my %options;
|
my %options;
|
||||||
my ($ret, $args) = GetOptionsFromString($arguments,
|
my ($ret, $args) = GetOptionsFromString($arguments,
|
||||||
\%options,
|
\%options,
|
||||||
|
Loading…
Reference in New Issue
Block a user