Update to use newer Perl syntax - no functional changes.
Patch by kareila.
diffs (446 lines):
diff -r 717d27477813 -r e57798960719 bin/ljmaint.pl
--- a/bin/ljmaint.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/bin/ljmaint.pl Thu Dec 09 23:27:52 2010 -0600
@@ -15,7 +15,7 @@
use strict;
-use vars qw(%maint %maintinfo $VERBOSE);
+our ( %maint, %maintinfo, $VERBOSE );
unless (-d $ENV{'LJHOME'}) {
die "\$LJHOME not set.\n";
diff -r 717d27477813 -r e57798960719 bin/maint/stats.pl
--- a/bin/maint/stats.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/bin/maint/stats.pl Thu Dec 09 23:27:52 2010 -0600
@@ -15,7 +15,7 @@
use strict;
-use vars qw(%maint);
+our %maint;
require "$ENV{'LJHOME'}/cgi-bin/statslib.pl";
diff -r 717d27477813 -r e57798960719 bin/maint/synsuck.pl
--- a/bin/maint/synsuck.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/bin/maint/synsuck.pl Thu Dec 09 23:27:52 2010 -0600
@@ -14,7 +14,7 @@
# part of this distribution.
use strict;
-use vars qw(%maint %maintinfo);
+our ( %maint, %maintinfo );
use lib "$ENV{'LJHOME'}/cgi-bin"; # extra XML::Encoding files in cgi-bin/XML/*
use LJ::SynSuck;
diff -r 717d27477813 -r e57798960719 cgi-bin/Apache/DebateSuicide.pm
--- a/cgi-bin/Apache/DebateSuicide.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/Apache/DebateSuicide.pm Thu Dec 09 23:27:52 2010 -0600
@@ -19,9 +19,7 @@ use Apache2::Const qw/ :common /;
use Apache2::Const qw/ :common /;
use LJ::ModuleCheck;
-use vars qw($gtop);
-our %known_parent;
-our $ppid;
+our ( $gtop, %known_parent, $ppid );
# oh btw, this is totally linux-specific. gtop didn't work, so so much for
portability.
sub handler
diff -r 717d27477813 -r e57798960719 cgi-bin/Apache/SendStats.pm
--- a/cgi-bin/Apache/SendStats.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/Apache/SendStats.pm Thu Dec 09 23:27:52 2010 -0600
@@ -24,7 +24,7 @@ use Apache2::Const qw/ :common /;
use Apache2::Const qw/ :common /;
use Socket qw(SO_BROADCAST);
-use vars qw(%udp_sock);
+our %udp_sock;
sub handler
{
diff -r 717d27477813 -r e57798960719 cgi-bin/DW/Request.pm
--- a/cgi-bin/DW/Request.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/DW/Request.pm Thu Dec 09 23:27:52 2010 -0600
@@ -30,7 +30,7 @@ use DW::Request::Apache2;
use DW::Request::Apache2;
use DW::Request::Standard;
-use vars qw( $cur_req $determined );
+our ( $cur_req, $determined );
=head1 Class Methods
diff -r 717d27477813 -r e57798960719 cgi-bin/JSON.pm
--- a/cgi-bin/JSON.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/JSON.pm Thu Dec 09 23:27:52 2010 -0600
@@ -20,20 +20,17 @@ use JSON::Converter;
@JSON::EXPORT = qw(objToJson jsonToObj);
-use vars qw($AUTOCONVERT $VERSION $UnMapping $BareKey $QuotApos
- $ExecCoderef $SkipInvalid $Pretty $Indent $Delimiter);
+our $VERSION = '1.00';
-$VERSION = '1.00';
-
-$AUTOCONVERT = 1;
-$SkipInvalid = 0;
-$ExecCoderef = 0;
-$Pretty = 0; # pretty-print mode switch
-$Indent = 2; # (for pretty-print)
-$Delimiter = 2; # (for pretty-print) 0 => ':', 1 => ': ', 2 => ' : '
-$UnMapping = 0; #
-$BareKey = 0; #
-$QuotApos = 0; #
+our $AUTOCONVERT = 1;
+our $SkipInvalid = 0;
+our $ExecCoderef = 0;
+our $Pretty = 0; # pretty-print mode switch
+our $Indent = 2; # (for pretty-print)
+our $Delimiter = 2; # (for pretty-print) 0 => ':', 1 => ': ', 2 => ' : '
+our $UnMapping = 0; #
+our $BareKey = 0; #
+our $QuotApos = 0; #
my $parser; # JSON => Perl
my $conv; # Perl => JSON
diff -r 717d27477813 -r e57798960719 cgi-bin/JSON/Parser.pm
--- a/cgi-bin/JSON/Parser.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/JSON/Parser.pm Thu Dec 09 23:27:52 2010 -0600
@@ -18,10 +18,9 @@ package JSON::Parser;
# http://www.crockford.com/JSON/json.js
#
-use vars qw($VERSION);
use strict;
-$VERSION = 1.00;
+our $VERSION = 1.00;
my %escapes = ( # by Jeremy Muhlich <jmuhlich [at] bitflood.org>
b => "\x8",
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Entry.pm Thu Dec 09 23:27:52 2010 -0600
@@ -19,7 +19,7 @@
package LJ::Entry;
use strict;
-use vars qw/ $AUTOLOAD /;
+our $AUTOLOAD;
use Carp qw/ croak confess /;
=head1 NAME
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/MemCache.pm
--- a/cgi-bin/LJ/MemCache.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/MemCache.pm Thu Dec 09 23:27:52 2010 -0600
@@ -20,8 +20,7 @@ use strict;
package LJ::MemCache;
-use vars qw($GET_DISABLED);
-$GET_DISABLED = 0;
+our $GET_DISABLED = 0;
# NOTE: if you update the list of values stored in the cache here, you will
# need to increment the version number, too.
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/ModuleLoader.pm
--- a/cgi-bin/LJ/ModuleLoader.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/ModuleLoader.pm Thu Dec 09 23:27:52 2010 -0600
@@ -18,10 +18,9 @@ use strict;
use strict;
use IO::Dir;
require Exporter;
-use vars qw(@ISA @EXPORT);
-...@isa = qw(Exporter);
-...@export = qw(module_subclasses);
+our @ISA = qw(Exporter);
+our @EXPORT = qw(module_subclasses);
use DW;
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/SpellCheck.pm
--- a/cgi-bin/LJ/SpellCheck.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/SpellCheck.pm Thu Dec 09 23:27:52 2010 -0600
@@ -25,8 +25,7 @@ use Config;
use Config;
use constant PERLIO_IS_ENABLED => $Config{useperlio};
-use vars qw( $VERSION );
-$VERSION = '2.0';
+our $VERSION = '2.0';
# Good spellcommand values:
# /usr/bin/ispell -a -h
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Support.pm
--- a/cgi-bin/LJ/Support.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Support.pm Thu Dec 09 23:27:52 2010 -0600
@@ -14,8 +14,6 @@ package LJ::Support;
package LJ::Support;
use strict;
-use vars qw(@SUPPORT_PRIVS);
-
use Digest::MD5 qw(md5_hex);
use lib "$LJ::HOME/cgi-bin";
@@ -23,17 +21,17 @@ use LJ::Faq;
use LJ::Faq;
# Constants
-my $SECONDS_IN_DAY = 3600 * 24;
-...@support_privs = (qw/supportclose
- supporthelp
- supportdelete
- supportread
- supportviewinternal
- supportmakeinternal
- supportmovetouch
- supportviewscreened
- supportviewstocks
- supportchangesummary/);
+my $SECONDS_IN_DAY = 3600 * 24;
+our @SUPPORT_PRIVS = ( qw/supportclose
+ supporthelp
+ supportdelete
+ supportread
+ supportviewinternal
+ supportmakeinternal
+ supportmovetouch
+ supportviewscreened
+ supportviewstocks
+ supportchangesummary/ );
# <LJFUNC>
# name: LJ::Support::slow_query_dbh
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Test.pm
--- a/cgi-bin/LJ/Test.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Test.pm Thu Dec 09 23:27:52 2010 -0600
@@ -15,7 +15,6 @@ require Exporter;
require Exporter;
use strict;
use Carp qw(croak);
-use vars qw(@ISA @EXPORT);
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# WARNING! PELIGROSO! ACHTUNG! VNIMANIYE!
@@ -26,8 +25,8 @@ use vars qw(@ISA @EXPORT);
use DBI;
use LJ::ModuleCheck;
-...@isa = qw(Exporter);
-...@export = qw(memcache_stress with_fake_memcache temp_user temp_comm
temp_feed fake_apache);
+our @ISA = qw(Exporter);
+our @EXPORT = qw(memcache_stress with_fake_memcache temp_user temp_comm
temp_feed fake_apache);
my @temp_userids; # to be destroyed later
END {
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/TextMessage.pm
--- a/cgi-bin/LJ/TextMessage.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/TextMessage.pm Thu Dec 09 23:27:52 2010 -0600
@@ -25,11 +25,10 @@ use MIME::Lite;
use MIME::Lite;
use strict;
-use vars qw($VERSION %providers);
-$VERSION = '1.5.6';
+our $VERSION = '1.5.6';
-%providers = (
+our %providers = (
'email' => {
'name' => 'Other',
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Widget/InboxFolderNav.pm
--- a/cgi-bin/LJ/Widget/InboxFolderNav.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Widget/InboxFolderNav.pm Thu Dec 09 23:27:52 2010 -0600
@@ -14,7 +14,6 @@ package LJ::Widget::InboxFolderNav;
package LJ::Widget::InboxFolderNav;
use strict;
-use vars qw(%GET %POST);
use base qw(LJ::Widget);
use Carp qw(croak);
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Worker/Gearman.pm
--- a/cgi-bin/LJ/Worker/Gearman.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Worker/Gearman.pm Thu Dec 09 23:27:52 2010 -0600
@@ -19,7 +19,6 @@ use LJ::WorkerResultStorage;
use LJ::WorkerResultStorage;
require "ljlib.pl";
-use vars qw(@EXPORT @EXPORT_OK);
use Getopt::Long;
use IO::Socket::INET ();
use Carp qw(croak);
@@ -33,7 +32,7 @@ die "Unknown options" unless
die "Unknown options" unless
GetOptions("verbose|v" => \$opt_verbose);
-...@export = qw(gearman_decl gearman_work gearman_set_idle_handler
gearman_set_requester_id);
+our @EXPORT = qw(gearman_decl gearman_work gearman_set_idle_handler
gearman_set_requester_id);
my $worker = Gearman::Worker->new;
my $idle_handler;
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/Worker/TheSchwartz.pm
--- a/cgi-bin/LJ/Worker/TheSchwartz.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/Worker/TheSchwartz.pm Thu Dec 09 23:27:52 2010 -0600
@@ -17,7 +17,6 @@ use base "LJ::Worker", "Exporter";
use base "LJ::Worker", "Exporter";
require "ljlib.pl";
-use vars qw(@EXPORT @EXPORT_OK);
use Getopt::Long;
my $interval = 5;
@@ -31,7 +30,7 @@ my $quit_flag = 0;
$quit_flag = 1;
};
-...@export = qw(schwartz_decl schwartz_work schwartz_on_idle
schwartz_on_afterwork schwartz_on_prework schwartz_prioritize);
+our @EXPORT = qw(schwartz_decl schwartz_work schwartz_on_idle
schwartz_on_afterwork schwartz_on_prework schwartz_prioritize);
my $sclient;
my $prioritize = 0;
diff -r 717d27477813 -r e57798960719 cgi-bin/LJ/XMLRPC.pm
--- a/cgi-bin/LJ/XMLRPC.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/LJ/XMLRPC.pm Thu Dec 09 23:27:52 2010 -0600
@@ -14,7 +14,7 @@ package LJ::XMLRPC;
package LJ::XMLRPC;
use strict;
-use vars qw/ $AUTOLOAD /;
+our $AUTOLOAD;
sub AUTOLOAD {
my $method = $AUTOLOAD;
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom.pm
--- a/cgi-bin/XML/Atom.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom.pm Thu Dec 09 23:27:52 2010 -0600
@@ -53,7 +53,7 @@ sub new {
sub DESTROY { }
-use vars qw( $AUTOLOAD );
+our $AUTOLOAD;
sub AUTOLOAD {
(my $var = $AUTOLOAD) =~ s!.+::!!;
no strict 'refs';
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom/ErrorHandler.pm
--- a/cgi-bin/XML/Atom/ErrorHandler.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom/ErrorHandler.pm Thu Dec 09 23:27:52 2010 -0600
@@ -16,7 +16,7 @@ package XML::Atom::ErrorHandler;
package XML::Atom::ErrorHandler;
use strict;
-use vars qw( $ERROR );
+our $ERROR;
sub new { bless {}, shift }
sub error {
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom/Link.pm
--- a/cgi-bin/XML/Atom/Link.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom/Link.pm Thu Dec 09 23:27:52 2010 -0600
@@ -93,7 +93,7 @@ sub as_xml {
sub DESTROY { }
-use vars qw( $AUTOLOAD );
+our $AUTOLOAD;
sub AUTOLOAD {
(my $var = $AUTOLOAD) =~ s!.+::!!;
no strict 'refs';
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom/Person.pm
--- a/cgi-bin/XML/Atom/Person.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom/Person.pm Thu Dec 09 23:27:52 2010 -0600
@@ -101,7 +101,7 @@ sub as_xml {
sub DESTROY { }
-use vars qw( $AUTOLOAD );
+our $AUTOLOAD;
sub AUTOLOAD {
(my $var = $AUTOLOAD) =~ s!.+::!!;
no strict 'refs';
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom/Thing.pm
--- a/cgi-bin/XML/Atom/Thing.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom/Thing.pm Thu Dec 09 23:27:52 2010 -0600
@@ -340,7 +340,7 @@ sub _element {
sub DESTROY { }
-use vars qw( $AUTOLOAD );
+our $AUTOLOAD;
sub AUTOLOAD {
(my $var = $AUTOLOAD) =~ s!.+::!!;
no strict 'refs';
diff -r 717d27477813 -r e57798960719 cgi-bin/XML/Atom/Util.pm
--- a/cgi-bin/XML/Atom/Util.pm Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/XML/Atom/Util.pm Thu Dec 09 23:27:52 2010 -0600
@@ -17,11 +17,11 @@ use strict;
use strict;
use XML::Atom;
-use vars qw( @EXPORT_OK @ISA );
use Encode;
use Exporter;
-...@export_ok = qw( set_ns hack_unicode_entity first nodelist textValue iso2dt
encode_xml remove_default_ns );
-...@isa = qw( Exporter );
+
+our @EXPORT_OK = qw( set_ns hack_unicode_entity first nodelist textValue
iso2dt encode_xml remove_default_ns );
+our @ISA = qw( Exporter );
our %NS_MAP = (
'0.3' => 'http://purl.org/atom/ns#',
diff -r 717d27477813 -r e57798960719 cgi-bin/imageconf.pl
--- a/cgi-bin/imageconf.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/imageconf.pl Thu Dec 09 23:27:52 2010 -0600
@@ -15,7 +15,7 @@
use strict;
package LJ::Img;
-use vars qw(%img);
+our %img;
$img{ins_obj} = {
src => '/ins-object.gif',
diff -r 717d27477813 -r e57798960719 cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/cgi-bin/ljlib.pl Thu Dec 09 23:27:52 2010 -0600
@@ -2242,7 +2242,7 @@ sub is_from_test {
return $0 && $0 =~ m!(^|/)t/!;
}
-use vars qw($AUTOLOAD);
+our $AUTOLOAD;
sub AUTOLOAD {
if ($AUTOLOAD eq "LJ::send_mail") {
require "ljmail.pl";
diff -r 717d27477813 -r e57798960719 doc/raw/build/caps/cap2db.pl
--- a/doc/raw/build/caps/cap2db.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/doc/raw/build/caps/cap2db.pl Thu Dec 09 23:27:52 2010 -0600
@@ -9,7 +9,7 @@ unless (-d $LJ::HOME) {
die "\$LJHOME not set.\n";
}
-use vars qw(%caps_general %caps_local);
+our ( %caps_general, %caps_local );
# Local caps are placed in file: cap-local.pl.
# Use format in cap2db.pl, substituting 'caps_local' with 'caps_general'
diff -r 717d27477813 -r e57798960719 doc/raw/build/hooks/hooks2db.pl
--- a/doc/raw/build/hooks/hooks2db.pl Thu Dec 09 19:15:30 2010 +0800
+++ b/doc/raw/build/hooks/hooks2db.pl Thu Dec 09 23:27:52 2010 -0600
@@ -9,7 +9,7 @@ unless (-d $LJ::HOME) {
die "\$LJHOME not set.\n";
}
-use vars qw(%hooks);
+our %hooks;
my $LJHOME = $LJ::HOME;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog