git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael G. Schwern" <schwern@pobox.com>
To: git@vger.kernel.org, gitster@pobox.com
Cc: robbat2@gentoo.org, bwalton@artsci.utoronto.ca,
	normalperson@yhbt.net, jrnieder@gmail.com, schwern@pobox.com
Subject: [PATCH 5/8] Load all the modules in one place and before running code.
Date: Thu, 26 Jul 2012 17:26:04 -0700	[thread overview]
Message-ID: <1343348767-86446-6-git-send-email-schwern@pobox.com> (raw)
In-Reply-To: <1343348767-86446-1-git-send-email-schwern@pobox.com>

From: "Michael G. Schwern" <schwern@pobox.com>

Just makes the code easier to follow.  No functional change.

Also eliminate an unused lexical $SVN.
---
 git-svn.perl | 44 +++++++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 3741e2e..fc49ad6 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -10,11 +10,26 @@ use vars qw/	$AUTHOR $VERSION
 $AUTHOR = 'Eric Wong <normalperson@yhbt.net>';
 $VERSION = '@@GIT_VERSION@@';
 
+use Carp qw/croak/;
+use Digest::MD5;
+use IO::File qw//;
+use File::Basename qw/dirname basename/;
+use File::Path qw/mkpath/;
+use File::Spec;
+use File::Find;
+use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
+use IPC::Open3;
+use Memoize;
+
 use Git::SVN;
+use Git::SVN::Editor;
+use Git::SVN::Fetcher;
+use Git::SVN::Ra;
+use Git::SVN::Prompt;
 use Git::SVN::Log;
 use Git::SVN::Migration;
-use Git::SVN::Utils qw(fatal can_compress);
 
+use Git::SVN::Utils qw(fatal can_compress);
 use Git qw(
     git_cmd_try
     command
@@ -26,6 +41,11 @@ use Git qw(
     command_close_bidi_pipe
 );
 
+BEGIN {
+	Memoize::memoize 'Git::config';
+	Memoize::memoize 'Git::config_bool';
+}
+
 
 # From which subdir have we been invoked?
 my $cmd_dir_prefix = eval {
@@ -79,28 +99,6 @@ sub _req_svn {
 	}
 }
 
-use Carp qw/croak/;
-use Digest::MD5;
-use IO::File qw//;
-use File::Basename qw/dirname basename/;
-use File::Path qw/mkpath/;
-use File::Spec;
-use File::Find;
-use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
-use IPC::Open3;
-use Git::SVN::Editor qw//;
-use Git::SVN::Fetcher qw//;
-use Git::SVN::Ra qw//;
-use Git::SVN::Prompt qw//;
-use Memoize;  # core since 5.8.0, Jul 2002
-
-BEGIN {
-	Memoize::memoize 'Git::config';
-	Memoize::memoize 'Git::config_bool';
-}
-
-my ($SVN);
-
 $sha1 = qr/[a-f\d]{40}/;
 $sha1_short = qr/[a-f\d]{4,40}/;
 my ($_stdin, $_help, $_edit,
-- 
1.7.11.1

  parent reply	other threads:[~2012-07-27  0:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  0:25 Extract remaining classes from git-svn Michael G. Schwern
2012-07-27  0:26 ` [PATCH 1/8] Prepare Git::SVN::Log for extraction " Michael G. Schwern
2012-07-27  0:26 ` [PATCH 2/8] Extract Git::SVN::Log " Michael G. Schwern
2012-07-27  0:26 ` [PATCH 3/8] Prepare Git::SVN::Migration for extraction " Michael G. Schwern
2012-07-27  0:26 ` [PATCH 4/8] Extract Git::SVN::Migration " Michael G. Schwern
2012-07-27  0:26 ` Michael G. Schwern [this message]
2012-07-27  0:26 ` [PATCH 6/8] Move Git::IndexInfo into its own file Michael G. Schwern
2012-07-27  0:26 ` [PATCH 7/8] Extract Git::SVN::GlobSpec from git-svn Michael G. Schwern
2012-07-27  0:26 ` [PATCH 8/8] Fix indents to match style Michael G. Schwern
2012-07-27  0:27 ` Extract remaining classes from git-svn Michael G Schwern
2012-07-27 11:29   ` Erik Faye-Lund
2012-07-27 19:00     ` Michael G Schwern
2012-07-28  0:40 ` Eric Wong
2012-07-28  4:05   ` Junio C Hamano
2012-07-28  4:12     ` Eric Wong
2012-07-28  4:25       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343348767-86446-6-git-send-email-schwern@pobox.com \
    --to=schwern@pobox.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=robbat2@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).