Committer: ailyin
LJSUP-8865 (ensure that modules in cgi-bin use strict)U trunk/cgi-bin/Apache/SendStats.pm U trunk/cgi-bin/BlobClient/Remote.pm U trunk/cgi-bin/LJ/CProd/Birthdays.pm U trunk/cgi-bin/LJ/CProd/ControlStrip.pm U trunk/cgi-bin/LJ/CProd/Feeds.pm U trunk/cgi-bin/LJ/CProd/FriendsFriends.pm U trunk/cgi-bin/LJ/CProd/Polls.pm U trunk/cgi-bin/LJ/CProd/UserPic.pm U trunk/cgi-bin/LJ/Constants.pm U trunk/cgi-bin/LJ/DBUtil.pm U trunk/cgi-bin/LJ/FBInterface.pm U trunk/cgi-bin/LJ/JSON.pm U trunk/cgi-bin/LJ/JSUtil.pm U trunk/cgi-bin/LJ/S2Theme/classic.pm U trunk/cgi-bin/LJ/S2Theme/cleansimple.pm U trunk/cgi-bin/LJ/S2Theme/deardiary.pm U trunk/cgi-bin/LJ/S2Theme/digitalmultiplex.pm U trunk/cgi-bin/LJ/S2Theme/disjointed.pm U trunk/cgi-bin/LJ/S2Theme/generator.pm U trunk/cgi-bin/LJ/S2Theme/haven.pm U trunk/cgi-bin/LJ/S2Theme/lickable.pm U trunk/cgi-bin/LJ/S2Theme/magazine.pm U trunk/cgi-bin/LJ/S2Theme/notepad.pm U trunk/cgi-bin/LJ/S2Theme/punquin.pm U trunk/cgi-bin/LJ/S2Theme/refriedpaper.pm U trunk/cgi-bin/LJ/S2Theme/sixhtml.pm U trunk/cgi-bin/LJ/S2Theme/sturdygesture.pm U trunk/cgi-bin/LJ/S2Theme/stylecontest.pm U trunk/cgi-bin/LJ/S2Theme/tabularindent.pm U trunk/cgi-bin/LJ/S2Theme/variableflow.pm U trunk/cgi-bin/LJ/Schools/Log.pm U trunk/cgi-bin/LJ/Schools/Stats.pm U trunk/cgi-bin/LJ/Setting/WebmasterTools/Google.pm U trunk/cgi-bin/LJ/Setting/WebmasterTools/Yandex.pm U trunk/cgi-bin/LJ/TagGenerator.pm U trunk/cgi-bin/LJ/WURFL/Parser.pm U trunk/cgi-bin/LJ/WURFL.pm U trunk/cgi-bin/LJ/Widget/IPPU.pm U trunk/cgi-bin/accountcodes.pl U trunk/cgi-bin/crumbs.pl U trunk/cgi-bin/emailcheck.pl U trunk/cgi-bin/lj-bml-blocks.pl U trunk/cgi-bin/lj-bml-init.pl U trunk/cgi-bin/ljdefaults.pl U trunk/cgi-bin/ljtodo.pl U trunk/cgi-bin/propparse.pl
Modified: trunk/cgi-bin/Apache/SendStats.pm =================================================================== --- trunk/cgi-bin/Apache/SendStats.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/Apache/SendStats.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,7 +1,5 @@ -#!/usr/bin/perl -# - package Apache::SendStats; +use strict; BEGIN { $LJ::HAVE_AVAIL = eval "use Apache::Availability qw(count_servers); 1;"; Modified: trunk/cgi-bin/BlobClient/Remote.pm =================================================================== --- trunk/cgi-bin/BlobClient/Remote.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/BlobClient/Remote.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,7 +1,5 @@ -#!/usr/bin/perl -# vim:ts=4 sw=4 et: - package BlobClient::Remote; +use strict; use BlobClient; use LWP::UserAgent; Modified: trunk/cgi-bin/LJ/CProd/Birthdays.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/Birthdays.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/Birthdays.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::Birthdays; +use strict; + use base 'LJ::CProd'; sub applicable { Modified: trunk/cgi-bin/LJ/CProd/ControlStrip.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/ControlStrip.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/ControlStrip.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::ControlStrip; +use strict; + use base 'LJ::CProd'; sub applicable { Modified: trunk/cgi-bin/LJ/CProd/Feeds.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/Feeds.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/Feeds.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::Feeds; +use strict; + use base 'LJ::CProd'; sub applicable { Modified: trunk/cgi-bin/LJ/CProd/FriendsFriends.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/FriendsFriends.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/FriendsFriends.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::FriendsFriends; +use strict; + use base 'LJ::CProd'; sub applicable { Modified: trunk/cgi-bin/LJ/CProd/Polls.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/Polls.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/Polls.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::Polls; +use strict; + use base 'LJ::CProd'; sub applicable { Modified: trunk/cgi-bin/LJ/CProd/UserPic.pm =================================================================== --- trunk/cgi-bin/LJ/CProd/UserPic.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/CProd/UserPic.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::CProd::UserPic; +use strict; + use base 'LJ::CProd'; sub applicable { @@ -9,7 +11,7 @@ sub render { my ($class, $u, $version) = @_; - $ml_key = $class->get_ml($version); + my $ml_key = $class->get_ml($version); my $link = $class->clickthru_link('cprod.userpic.link', $version); my $user = LJ::ljuser($u); my $empty = '<div style="overflow: hidden; padding: 5px; width: 100px; Modified: trunk/cgi-bin/LJ/Constants.pm =================================================================== --- trunk/cgi-bin/LJ/Constants.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Constants.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,3 +1,6 @@ +package LJ; +use strict; + # LJ::Constants module, but actually loads everything into package # "LJ". doesn't export to other modules. for compat, other callers # still can do LJ::BMAX_NAME, etc @@ -2,4 +5,2 @@ -package LJ; - use constant ENDOFTIME => 2147483647; Modified: trunk/cgi-bin/LJ/DBUtil.pm =================================================================== --- trunk/cgi-bin/LJ/DBUtil.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/DBUtil.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::DBUtil; +use strict; use lib "$ENV{LJHOME}/cgi-bin"; require "ljlib.pl"; Modified: trunk/cgi-bin/LJ/FBInterface.pm =================================================================== --- trunk/cgi-bin/LJ/FBInterface.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/FBInterface.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::FBInterface; +use strict; # Is there a current LJ session? # If so, return info. Modified: trunk/cgi-bin/LJ/JSON.pm =================================================================== --- trunk/cgi-bin/LJ/JSON.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/JSON.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::JSON; +use strict; my $wrap; @@ -94,6 +95,7 @@ package LJ::JSON::XS; +our @ISA; BEGIN { @ISA = qw(LJ::JSON::Wrapper JSON::XS); } sub can_load { @@ -128,6 +130,7 @@ package LJ::JSON::JSONv2; +our @ISA; BEGIN { @ISA = qw(LJ::JSON::Wrapper JSON); } sub can_load { @@ -162,6 +165,7 @@ package LJ::JSON::JSONv1; +our @ISA; BEGIN { @ISA = qw(LJ::JSON::Wrapper JSON); } sub can_load { Modified: trunk/cgi-bin/LJ/JSUtil.pm =================================================================== --- trunk/cgi-bin/LJ/JSUtil.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/JSUtil.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::JSUtil; +use strict; #<LJFUNC> # name: LJ::JSUtil::autocomplete Modified: trunk/cgi-bin/LJ/S2Theme/classic.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/classic.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/classic.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::classic; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean cool ) } Modified: trunk/cgi-bin/LJ/S2Theme/cleansimple.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/cleansimple.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/cleansimple.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::cleansimple; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2l" => "left", "2r" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/deardiary.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/deardiary.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/deardiary.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::deardiary; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2l" => 1 ) } Modified: trunk/cgi-bin/LJ/S2Theme/digitalmultiplex.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/digitalmultiplex.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/digitalmultiplex.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::digitalmultiplex; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2r" => 1 ) } Modified: trunk/cgi-bin/LJ/S2Theme/disjointed.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/disjointed.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/disjointed.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::disjointed; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2lnh" => "left", "2rnh" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/generator.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/generator.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/generator.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::generator; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean cool ) } Modified: trunk/cgi-bin/LJ/S2Theme/haven.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/haven.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/haven.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::haven; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2l" => "left", "2r" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/lickable.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/lickable.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/lickable.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::lickable; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2r" => 1 ) } Modified: trunk/cgi-bin/LJ/S2Theme/magazine.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/magazine.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/magazine.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::magazine; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean cool ) } Modified: trunk/cgi-bin/LJ/S2Theme/notepad.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/notepad.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/notepad.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::notepad; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean ) } Modified: trunk/cgi-bin/LJ/S2Theme/punquin.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/punquin.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/punquin.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::punquin; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2lnh" => "left", "2rnh" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/refriedpaper.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/refriedpaper.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/refriedpaper.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::refriedpaper; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2l" => "left", "2r" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/sixhtml.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/sixhtml.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/sixhtml.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::sixhtml; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "1" => "1C", "2l" => "2CL", "2r" => "2CR", "3m" => "3C" ) } Modified: trunk/cgi-bin/LJ/S2Theme/sturdygesture.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/sturdygesture.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/sturdygesture.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::sturdygesture; +use strict; + use base qw(LJ::S2Theme); sub layouts { ( "2lnh" => "left", "2rnh" => "right" ) } Modified: trunk/cgi-bin/LJ/S2Theme/stylecontest.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/stylecontest.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/stylecontest.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::stylecontest; +use strict; + use base qw(LJ::S2Theme::sixhtml); sub cats { () } Modified: trunk/cgi-bin/LJ/S2Theme/tabularindent.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/tabularindent.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/tabularindent.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::tabularindent; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean cool ) } Modified: trunk/cgi-bin/LJ/S2Theme/variableflow.pm =================================================================== --- trunk/cgi-bin/LJ/S2Theme/variableflow.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/S2Theme/variableflow.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::S2Theme::variableflow; +use strict; + use base qw(LJ::S2Theme); sub cats { qw( clean cool ) } Modified: trunk/cgi-bin/LJ/Schools/Log.pm =================================================================== --- trunk/cgi-bin/LJ/Schools/Log.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Schools/Log.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,3 +1,6 @@ +package LJ::Schools::Log; +use strict; + =comment LJ::Schools::Log: a logger module for Schools Directory actions @@ -32,8 +35,6 @@ =cut -package LJ::Schools::Log; - use LJ::Schools::Stats; # LJ::Schools::Log->log: add a row to the logs table Modified: trunk/cgi-bin/LJ/Schools/Stats.pm =================================================================== --- trunk/cgi-bin/LJ/Schools/Stats.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Schools/Stats.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,3 +1,6 @@ +package LJ::Schools::Stats; +use strict; + =comment LJ::Schools::Stats: LJ::Schools::Log entries statistics. @@ -37,8 +40,6 @@ =cut -package LJ::Schools::Stats; - use DateTime; # LJ::Schools::Stats->record_touch: count the touch in statistics Modified: trunk/cgi-bin/LJ/Setting/WebmasterTools/Google.pm =================================================================== --- trunk/cgi-bin/LJ/Setting/WebmasterTools/Google.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Setting/WebmasterTools/Google.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::Setting::WebmasterTools::Google; +use strict; + use base 'LJ::Setting::WebmasterTools'; 1; Modified: trunk/cgi-bin/LJ/Setting/WebmasterTools/Yandex.pm =================================================================== --- trunk/cgi-bin/LJ/Setting/WebmasterTools/Yandex.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Setting/WebmasterTools/Yandex.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,6 @@ package LJ::Setting::WebmasterTools::Yandex; +use strict; + use base 'LJ::Setting::WebmasterTools'; 1; Modified: trunk/cgi-bin/LJ/TagGenerator.pm =================================================================== --- trunk/cgi-bin/LJ/TagGenerator.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/TagGenerator.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,6 +1,6 @@ -#!/usr/bin/perl +package LJ::TagGenerator; +use strict; -package LJ::TagGenerator; use Carp; my %_tag_groups = ( @@ -41,7 +41,9 @@ *{"${package}::$prefix$tag$suffix"} = \&{"__$tag"}; } } - + +our $AUTOLOAD; + sub AUTOLOAD { $AUTOLOAD =~ /::__([^:]*)$/ or croak "No such method $AUTOLOAD"; my $tagname = lc $1; Modified: trunk/cgi-bin/LJ/WURFL/Parser.pm =================================================================== --- trunk/cgi-bin/LJ/WURFL/Parser.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/WURFL/Parser.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::WURFL::Parser; +use strict; use XML::Parser; use Storable qw(nstore); Modified: trunk/cgi-bin/LJ/WURFL.pm =================================================================== --- trunk/cgi-bin/LJ/WURFL.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/WURFL.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,4 +1,5 @@ package LJ::WURFL; +use strict; use Storable qw(retrieve); Modified: trunk/cgi-bin/LJ/Widget/IPPU.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/IPPU.pm 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/LJ/Widget/IPPU.pm 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,5 +1,8 @@ +package LJ::Widget::IPPU; +use strict; + # base class for in page popup widgets -package LJ::Widget::IPPU; + use base 'LJ::Widget'; # load all subclasses Modified: trunk/cgi-bin/accountcodes.pl =================================================================== --- trunk/cgi-bin/accountcodes.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/accountcodes.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,6 +1,5 @@ -#!/usr/bin/perl - package LJ; +use strict; # <LJFUNC> # name: LJ::acid_encode Modified: trunk/cgi-bin/crumbs.pl =================================================================== --- trunk/cgi-bin/crumbs.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/crumbs.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,5 +1,6 @@ -#!/usr/bin/perl -# +package LJ; +use strict; + # Stores all global crumbs and builds the crumbs hash use POSIX qw/ENOENT/; Modified: trunk/cgi-bin/emailcheck.pl =================================================================== --- trunk/cgi-bin/emailcheck.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/emailcheck.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,10 +1,9 @@ -#!/usr/bin/perl -# +package LJ; +use strict; + # Function to reject bogus email addresses # -package LJ; - # <LJFUNC> # name: LJ::check_email # des: checks for and rejects bogus e-mail addresses. Modified: trunk/cgi-bin/lj-bml-blocks.pl =================================================================== --- trunk/cgi-bin/lj-bml-blocks.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/lj-bml-blocks.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,5 +1,5 @@ -#!/usr/bin/perl -# +package LJ; +use strict; use lib "$ENV{LJHOME}/cgi-bin"; use LJ::Config; Modified: trunk/cgi-bin/lj-bml-init.pl =================================================================== --- trunk/cgi-bin/lj-bml-init.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/lj-bml-init.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,5 +1,5 @@ -#!/usr/bin/perl -# +package LJ; +use strict; use lib "$ENV{LJHOME}/cgi-bin"; use Errno qw(ENOENT); Modified: trunk/cgi-bin/ljdefaults.pl =================================================================== --- trunk/cgi-bin/ljdefaults.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/ljdefaults.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,5 +1,6 @@ -#!/usr/bin/perl -# +package LJ; +use strict; + # Do not edit this file. You should edit ljconfig.pl, which you should have at # cgi-bin/ljconfig.pl. If you don't, copy it from doc/ljconfig.pl.txt to cgi-bin # and edit it there. This file only provides backup default values for upgrading. @@ -9,64 +10,64 @@ package LJ; use Sys::Hostname (); - $DEFAULT_STYLE ||= { + $LJ::DEFAULT_STYLE ||= { 'core' => 'core1', 'layout' => 'generator/layout', 'i18n' => 'generator/en', }; # cluster 0 is no longer supported - $DEFAULT_CLUSTER ||= 1; - @CLUSTERS = (1) unless @CLUSTERS; + $LJ::DEFAULT_CLUSTER ||= 1; + @LJ::CLUSTERS = (1) unless @LJ::CLUSTERS; - $HOME = $ENV{'LJHOME'}; - $HTDOCS = "$HOME/htdocs"; - $SSLDOCS ||= "$HOME/ssldocs"; - $BIN = "$HOME/bin"; + $LJ::HOME = $ENV{'LJHOME'}; + $LJ::HTDOCS = "$LJ::HOME/htdocs"; + $LJ::SSLDOCS ||= "$LJ::HOME/ssldocs"; + $LJ::BIN = "$LJ::HOME/bin"; - $SERVER_NAME ||= Sys::Hostname::hostname(); + $LJ::SERVER_NAME ||= Sys::Hostname::hostname(); - $UNICODE = 1 unless defined $UNICODE; + $LJ::UNICODE = 1 unless defined $LJ::UNICODE; - @LANGS = ("en") unless @LANGS; - $DEFAULT_LANG ||= $LANGS[0]; + @LJ::LANGS = ("en") unless @LJ::LANGS; + $LJ::DEFAULT_LANG ||= $LJ::LANGS[0]; - $SITENAME ||= "NameNotConfigured.com"; - unless ($SITENAMESHORT) { - $SITENAMESHORT = $SITENAME; - $SITENAMESHORT =~ s/\..*//; # remove .net/.com/etc + $LJ::SITENAME ||= "NameNotConfigured.com"; + unless ($LJ::SITENAMESHORT) { + $LJ::SITENAMESHORT = $LJ::SITENAME; + $LJ::SITENAMESHORT =~ s/\..*//; # remove .net/.com/etc } - $SITENAMEABBREV ||= "[??]"; + $LJ::SITENAMEABBREV ||= "[??]"; - $MSG_READONLY_USER ||= "Database temporarily in read-only mode during maintenance."; + $LJ::MSG_READONLY_USER ||= "Database temporarily in read-only mode during maintenance."; - $DOMAIN_WEB ||= "www.$DOMAIN"; - $SITEROOT ||= "http://$DOMAIN_WEB"; - $IMGPREFIX ||= "$SITEROOT/img"; - $STATPREFIX ||= "$SITEROOT/stc"; - $WSTATPREFIX ||= "$SITEROOT/stc"; - $JSPREFIX ||= "$SITEROOT/js"; - $USERPIC_ROOT ||= "$LJ::SITEROOT/userpic"; - $PALIMGROOT ||= "$LJ::SITEROOT/palimg"; + $LJ::DOMAIN_WEB ||= "www.$LJ::DOMAIN"; + $LJ::SITEROOT ||= "http://$LJ::DOMAIN_WEB"; + $LJ::IMGPREFIX ||= "$LJ::SITEROOT/img"; + $LJ::STATPREFIX ||= "$LJ::SITEROOT/stc"; + $LJ::WSTATPREFIX ||= "$LJ::SITEROOT/stc"; + $LJ::JSPREFIX ||= "$LJ::SITEROOT/js"; + $LJ::USERPIC_ROOT ||= "$LJ::SITEROOT/userpic"; + $LJ::PALIMGROOT ||= "$LJ::SITEROOT/palimg"; # path to sendmail and any necessary options - $SENDMAIL ||= "/usr/sbin/sendmail -t -oi"; + $LJ::SENDMAIL ||= "/usr/sbin/sendmail -t -oi"; # protocol, mailserver hostname, and preferential weight. # qmtp, smtp, dmtp, and sendmail are the currently supported protocols. - @MAIL_TRANSPORTS = ( [ 'sendmail', $SENDMAIL, 1 ] ) unless @MAIL_TRANSPORTS; + @LJ::MAIL_TRANSPORTS = ( [ 'sendmail', $LJ::SENDMAIL, 1 ] ) unless @LJ::MAIL_TRANSPORTS; # roles that slow support queries should use in order of precedence - @SUPPORT_SLOW_ROLES = ('slow') unless @SUPPORT_SLOW_ROLES; + @LJ::SUPPORT_SLOW_ROLES = ('slow') unless @LJ::SUPPORT_SLOW_ROLES; # where we set the cookies (note the period before the domain) - $COOKIE_DOMAIN ||= ".$DOMAIN"; - $COOKIE_PATH ||= "/"; - @COOKIE_DOMAIN_RESET = ("", "$DOMAIN", ".$DOMAIN") unless @COOKIE_DOMAIN_RESET; + $LJ::COOKIE_DOMAIN ||= ".$LJ::DOMAIN"; + $LJ::COOKIE_PATH ||= "/"; + @LJ::COOKIE_DOMAIN_RESET = ("", "$LJ::DOMAIN", ".$LJ::DOMAIN") unless @LJ::COOKIE_DOMAIN_RESET; - $MAX_SCROLLBACK_LASTN ||= 100; - $MAX_SCROLLBACK_FRIENDS ||= 1000; - $MAX_USERPIC_KEYWORDS ||= 10; + $LJ::MAX_SCROLLBACK_LASTN ||= 100; + $LJ::MAX_SCROLLBACK_FRIENDS ||= 1000; + $LJ::MAX_USERPIC_KEYWORDS ||= 10; $LJ::AUTOSAVE_DRAFT_INTERVAL ||= 3; @@ -142,32 +143,32 @@ } # Send community invites from the admin address unless otherwise specified - $COMMUNITY_EMAIL ||= $ADMIN_EMAIL; + $LJ::COMMUNITY_EMAIL ||= $LJ::ADMIN_EMAIL; # The list of content types that we consider valid for gzip compression. - %GZIP_OKAY = ( + %LJ::GZIP_OKAY = ( 'text/html' => 1, # regular web pages; XHTML 1.0 "may" be this 'text/xml' => 1, # regular XML files 'application/xml' => 1, # XHTML 1.1 "may" be this 'application/xhtml+xml' => 1, # XHTML 1.1 "should" be this 'application/rdf+xml' => 1, # FOAF should be this - ) unless %GZIP_OKAY; + ) unless %LJ::GZIP_OKAY; # maximum FOAF friends to return (so the server doesn't get overloaded) - $MAX_FOAF_FRIENDS ||= 1000; + $LJ::MAX_FOAF_FRIENDS ||= 1000; # maximum number of friendofs to load/memcache (affects userinfo.bml display) - $MAX_FRIENDOF_LOAD ||= 5000; + $LJ::MAX_FRIENDOF_LOAD ||= 5000; # whether to proactively delete any comments associated with an entry when we assign # a new jitemid (see the big comment above LJ::Protocol::new_entry_cleanup_hack) - $NEW_ENTRY_CLEANUP_HACK ||= 0; + $LJ::NEW_ENTRY_CLEANUP_HACK ||= 0; # block size is used in stats generation code that gets n rows from the db at a time - $STATS_BLOCK_SIZE ||= 10_000; + $LJ::STATS_BLOCK_SIZE ||= 10_000; # Maximum number of comments to display on Recent Comments page - $TOOLS_RECENT_COMMENTS_MAX ||= 50; + $LJ::TOOLS_RECENT_COMMENTS_MAX ||= 50; # setup the mogilefs defaults so we can create the necessary domains # and such. it is not recommended that you change the name of the @@ -180,17 +181,17 @@ # defined a MOGILEFS_CONFIG hash in ljconfig.pl and you explicitly set # at least the hosts key to be an arrayref of ip:port combinations # indicating where to reach your local MogileFS server. - %MOGILEFS_CONFIG = () unless defined %MOGILEFS_CONFIG; - $MOGILEFS_CONFIG{domain} ||= 'livejournal'; - $MOGILEFS_CONFIG{classes} ||= {}; - $MOGILEFS_CONFIG{classes}->{userpics} ||= 3; - $MOGILEFS_CONFIG{classes}->{captcha} ||= 2; + %LJ::MOGILEFS_CONFIG = () unless defined %LJ::MOGILEFS_CONFIG; + $LJ::MOGILEFS_CONFIG{domain} ||= 'livejournal'; + $LJ::MOGILEFS_CONFIG{classes} ||= {}; + $LJ::MOGILEFS_CONFIG{classes}->{userpics} ||= 3; + $LJ::MOGILEFS_CONFIG{classes}->{captcha} ||= 2; # Default to allow all reproxying. - %REPROXY_DISABLE = () unless %REPROXY_DISABLE; + %LJ::REPROXY_DISABLE = () unless %LJ::REPROXY_DISABLE; # Default error message for age verification needed - $UNDERAGE_ERROR ||= "Sorry, your account needs to be <a href='$SITEROOT/agecheck/'>age verified</a> before you can leave any comments."; + $LJ::UNDERAGE_ERROR ||= "Sorry, your account needs to be <a href='$LJ::SITEROOT/agecheck/'>age verified</a> before you can leave any comments."; # Terms of Service revision requirements foreach ( @@ -205,14 +206,14 @@ } # setup default minimal style information - $MINIMAL_USERAGENT{$_} ||= 1 foreach qw(Links Lynx w BlackBerry WebTV); # w is for w3m - $MINIMAL_BML_SCHEME ||= 'lynx'; - $MINIMAL_STYLE{'core'} ||= 'core1'; + $LJ::MINIMAL_USERAGENT{$_} ||= 1 foreach qw(Links Lynx w BlackBerry WebTV); # w is for w3m + $LJ::MINIMAL_BML_SCHEME ||= 'lynx'; + $LJ::MINIMAL_STYLE{'core'} ||= 'core1'; - $S2COMPILED_MIGRATION_DONE ||= 0; # turn on after s2compiled2 migration + $LJ::S2COMPILED_MIGRATION_DONE ||= 0; # turn on after s2compiled2 migration # max limit of schools attended - $SCHOOLSMAX ||= { + $LJ::SCHOOLSMAX ||= { 'P' => 25, 'I' => 25, 'S' => 25, @@ -221,18 +222,18 @@ # max content length we should read via ATOM api # 25MB - $MAX_ATOM_UPLOAD ||= 26214400; + $LJ::MAX_ATOM_UPLOAD ||= 26214400; - $CAPTCHA_AUDIO_MAKE ||= 100; - $CAPTCHA_AUDIO_PREGEN ||= 100; - $CAPTCHA_IMAGE_PREGEN ||= 500; - $CAPTCHA_IMAGE_RAW ||= "$LJ::HOME/htdocs/img/captcha"; + $LJ::CAPTCHA_AUDIO_MAKE ||= 100; + $LJ::CAPTCHA_AUDIO_PREGEN ||= 100; + $LJ::CAPTCHA_IMAGE_PREGEN ||= 500; + $LJ::CAPTCHA_IMAGE_RAW ||= "$LJ::HOME/htdocs/img/captcha"; - $DEFAULT_EDITOR ||= 'rich'; + $LJ::DEFAULT_EDITOR ||= 'rich'; # Portal boxes unless(scalar(@LJ::PORTAL_BOXES)) { - @PORTAL_BOXES = ( + @LJ::PORTAL_BOXES = ( 'Birthdays', 'UpdateJournal', 'TextMessage', @@ -252,13 +253,13 @@ } unless(scalar(@LJ::PORTAL_BOXES_HIDDEN)) { - @PORTAL_BOXES_HIDDEN = ( + @LJ::PORTAL_BOXES_HIDDEN = ( 'Debug', ); } unless (keys %LJ::PORTAL_DEFAULTBOXSTATES) { - %PORTAL_DEFAULTBOXSTATES = ( + %LJ::PORTAL_DEFAULTBOXSTATES = ( 'Birthdays' => { 'added' => 1, 'sort' => 4, @@ -357,11 +358,11 @@ ); } - unless (scalar @PROTECTED_USERNAMES) { - @PROTECTED_USERNAMES = ("^ex_", "^ext_", "^s_", "^_", '_$', '__'); + unless (scalar @LJ::PROTECTED_USERNAMES) { + @LJ::PROTECTED_USERNAMES = ("^ex_", "^ext_", "^s_", "^_", '_$', '__'); } - $USERPROP_DEF{'blob_clusterid'} ||= 1; + $LJ::USERPROP_DEF{'blob_clusterid'} ||= 1; # setup default limits for mogilefs classes if (%LJ::MOGILEFS_CONFIG) { @@ -380,7 +381,7 @@ $LJ::SMS_TITLE ||= "$LJ::SITENAMESHORT SMS"; # random user defaults to a week - $RANDOM_USER_PERIOD = 7; + $LJ::RANDOM_USER_PERIOD = 7; # how far in advance to send out birthday notifications $LJ::BIRTHDAY_NOTIFS_ADVANCE ||= 2*24*60*60; Modified: trunk/cgi-bin/ljtodo.pl =================================================================== --- trunk/cgi-bin/ljtodo.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/ljtodo.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,7 +1,5 @@ -#!/usr/bin/perl -# - package LJ::Todo; +use strict; sub get_permissions { @@ -38,7 +36,7 @@ } } - return %permission; + return; } Modified: trunk/cgi-bin/propparse.pl =================================================================== --- trunk/cgi-bin/propparse.pl 2011-05-24 03:48:18 UTC (rev 19111) +++ trunk/cgi-bin/propparse.pl 2011-05-24 03:56:07 UTC (rev 19112) @@ -1,10 +1,7 @@ -#!/usr/bin/perl -# - package LJ; +use strict; -$verbose = 0; -@obs = (); +my $verbose = 0; sub load_objects_from_file {