Przeglądaj źródła

instead of use warnings; we use $^W = 1; in order to support older Perl
versions.. use warnings; was first added in Perl 5.6

Morten Brix Pedersen 25 lat temu
rodzic
commit
b2897cb6d1

+ 1 - 1
modules/Pisg/Parser/Template.pm

@@ -5,7 +5,7 @@
 package Pisg::Parser::Template;
 
 use strict;
-use warnings;
+$^W = 1;
 
 # These three variables are regular expressions for extracting information
 # from the logfile.  $normalline is for lines where the person merely said

+ 1 - 1
modules/Pisg/Parser/bxlog.pm

@@ -1,7 +1,7 @@
 package Pisg::Parser::bxlog;
 
 use strict;
-use warnings;
+$^W = 1;
 
 
 my $normalline = '^\[\d+ \S+\/(\d+):\d+\] <([^>]+)> (.*)';

+ 2 - 2
modules/Pisg/Parser/eggdrop.pm

@@ -1,8 +1,8 @@
 package Pisg::Parser::eggdrop;
 
 use strict;
-use warnings;
-
+$^W = 1;
+ 
 
 my $normalline = '^\[(\d+):\d+\] <([^>]+)> (.*)';
 my $actionline = '^\[(\d+):\d+\] Action: (\S+) (.*)';

+ 1 - 2
modules/Pisg/Parser/grufti.pm

@@ -1,8 +1,7 @@
 package Pisg::Parser::grufti;
 
 use strict;
-use warnings;
-
+$^W = 1;
 
 my $normalline = '^\[(\d+):\d+\] <([^>]+)> (.*)';
 my $actionline = '^\[(\d+):\d+\] \* (\S+) (.*)';

+ 1 - 2
modules/Pisg/Parser/mIRC.pm

@@ -1,8 +1,7 @@
 package Pisg::Parser::mIRC;
 
 use strict;
-use warnings;
-
+$^W = 1;
 
 my $normalline = '^\[(\d+):\d+\] <([^>]+)> (.*)';
 my $actionline = '^\[(\d+):\d+\] \* (\S+) (.*)';

+ 1 - 1
modules/Pisg/Parser/mbot.pm

@@ -1,7 +1,7 @@
 package Pisg::Parser::mbot;
 
 use strict;
-use warnings;
+$^T = 1;
 
 
 my $normalline = '^\S+ \S+ \d+ (\d+):\d+:\d+ \d+ <([^>]+)> (?!\001ACTION)(.*)';

+ 2 - 1
modules/Pisg/Parser/xchat.pm

@@ -1,7 +1,8 @@
 package Pisg::Parser::xchat;
 
 use strict;
-use warnings;
+$^W = 1;
+
 
 my $normalline = '^(\d+):\d+:\d+ <([^>]+)>\s+(.*)';
 my $actionline = '^(\d+):\d+:\d+ \*\s+(\S+) (.*)';