From: Vincent Pit Date: Sat, 10 Mar 2012 10:38:09 +0000 (+0100) Subject: Switch to qw<> X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=9db5de0ec290fd8b82a9c510e0d627b31e44d9bd;p=perl%2Fscripts%2Fxchat.git Switch to qw<> --- diff --git a/Xchat/XPI.pm b/Xchat/XPI.pm index 7481f5c..ff98ec7 100644 --- a/Xchat/XPI.pm +++ b/Xchat/XPI.pm @@ -13,7 +13,7 @@ use constant { COLOR_TAG => "\00307" }; my @attributes; BEGIN { - @attributes = qw/tag name version desc author email url banner/; + @attributes = qw; } local *PH; @@ -52,7 +52,7 @@ sub new { *$ph->{$_} = $opts{$_} for @attributes; *$ph->{buf} = ''; - Xchat::register(@opts{qw/name version banner/}, sub { + Xchat::register(@opts{qw}, sub { $ph->flush; if (*$ph->{atexit_id}) { my @callbacks = sort { *$ph->{atexit}{$b} <=> *$ph->{atexit}{$a} } diff --git a/Xchat/XPI/Events.pm b/Xchat/XPI/Events.pm index 2c753e1..f387f8a 100644 --- a/Xchat/XPI/Events.pm +++ b/Xchat/XPI/Events.pm @@ -3,7 +3,7 @@ package Xchat::XPI::Events; use strict; use warnings; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; @@ -42,12 +42,12 @@ sub filter { return hook_print $from, \&_filter_cb, { data => \@_ }; } -use base qw/Exporter/; +use base qw; our @EXPORT = (); our %EXPORT_TAGS = ( - 'funcs' => [ qw/delay filter/ ], - 'consts' => [ qw/DEFAULT_DELAY/ ] + 'funcs' => [ qw ], + 'consts' => [ qw ] ); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/Xchat/XPI/Net.pm b/Xchat/XPI/Net.pm index a7b2679..9cb9937 100644 --- a/Xchat/XPI/Net.pm +++ b/Xchat/XPI/Net.pm @@ -7,10 +7,10 @@ use IO::Socket::INET; use Net::DNS; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; -use Xchat::XPI qw/register init/; +use Xchat::XPI qw; our $VERSION = '0.03'; @@ -110,10 +110,10 @@ sub _whois_recv { return REMOVE; } -use base qw/Exporter/; +use base qw; our @EXPORT = (); -our %EXPORT_TAGS = ('funcs' => [ qw/resolve whois/ ]); +our %EXPORT_TAGS = ('funcs' => [ qw ]); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/Xchat/XPI/Utils.pm b/Xchat/XPI/Utils.pm index 6fa15c1..8df6c0e 100644 --- a/Xchat/XPI/Utils.pm +++ b/Xchat/XPI/Utils.pm @@ -3,10 +3,10 @@ package Xchat::XPI::Utils; use strict; use warnings; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; -use Xchat::XPI qw/register init/; +use Xchat::XPI qw; our $VERSION = '0.02'; @@ -20,10 +20,10 @@ sub dye_nick { return sprintf "\003%d%s", $rcolors[$col], $nick; } -use base qw/Exporter/; +use base qw; our @EXPORT = (); -our %EXPORT_TAGS = ('funcs' => [ qw/dye_nick/ ]); +our %EXPORT_TAGS = ('funcs' => [ qw ]); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/clones.pl b/clones.pl index d47b027..72e1092 100755 --- a/clones.pl +++ b/clones.pl @@ -3,13 +3,13 @@ package Xchat::VPIT::Clones; use strict; use warnings; -use Scalar::Util qw/dualvar/; +use Scalar::Util qw; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; -use Xchat::XPI::Events qw/delay/; +use Xchat::XPI::Events qw; use constant { JOIN_DELAY => 1000, diff --git a/hl.pl b/hl.pl index 5b67967..7d1278b 100755 --- a/hl.pl +++ b/hl.pl @@ -3,11 +3,11 @@ package Xchat::VPIT::Highlight; use strict; use warnings; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; -use Xchat::XPI::Events qw/filter/; +use Xchat::XPI::Events qw; our $VERSION = '0.04'; @@ -25,7 +25,7 @@ sub guiclear { hook_print 'Private Message to Dialog', sub { guihl; return EAT_NONE }; my %hl = ( - '#cpantesters' => [ qw/ + '#cpantesters' => [ qw< Acme-CPANAuthors-You-re_using B-RecDeparse Bit-MorseSignals @@ -48,7 +48,7 @@ my %hl = ( rgit- subs-auto \bwith- - / ], + > ], ); for (keys %hl) { diff --git a/mpd.pl b/mpd.pl index ca73288..4877b52 100755 --- a/mpd.pl +++ b/mpd.pl @@ -5,7 +5,7 @@ use warnings; use Audio::MPD; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; @@ -50,7 +50,7 @@ hook_command $_, sub { return EAT_ALL; }, { help_text => "$_, output which song is currently played by mpd" -} for qw/MPD NP/; +} for qw; $ph = Xchat::XPI->new( name => 'MPD Client', diff --git a/net.pl b/net.pl index bcb9002..3dbf3f8 100755 --- a/net.pl +++ b/net.pl @@ -3,14 +3,14 @@ package Xchat::VPIT::Net; use strict; use warnings; -use List::Util qw/max/; -use Locale::Country qw/code2country/; +use List::Util qw; +use Locale::Country qw; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; -use Xchat::XPI::Net qw/resolve whois/; +use Xchat::XPI::Net qw; our $VERSION = '0.02'; diff --git a/opers.pl b/opers.pl index 6beaf93..988a22a 100755 --- a/opers.pl +++ b/opers.pl @@ -3,7 +3,7 @@ package Xchat::VPIT::Opers; use strict; use warnings; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; diff --git a/services.pl b/services.pl index 8fd3b90..f04a80e 100755 --- a/services.pl +++ b/services.pl @@ -3,7 +3,7 @@ package Xchat::VPIT::Services; use strict; use warnings; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; @@ -92,7 +92,7 @@ hook_command "C$_", \&csmode, { data => $_, help_text => join ' ', $_, '[nicks] ,', (lc $_), 'the specified targets (or you if none) on the current channel via ChanServ' -} for map { $_, "DE$_" } qw/VOICE HALFOP OP PROTECT/; +} for map { $_, "DE$_" } qw; $ph = Xchat::XPI->new( name => 'IRC Services', diff --git a/tools.pl b/tools.pl index b554d4a..b06f166 100755 --- a/tools.pl +++ b/tools.pl @@ -4,9 +4,9 @@ use strict; use warnings; use Data::Dumper; -use Encode qw/encode/; +use Encode qw; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI;