Permalink
Browse files

Add -no_match_vars to use English statements.

This is faster and more recommended (see perldoc English).
  • Loading branch information...
1 parent ee83ecb commit b64ddf62f902adb45abf4d49c51765446b7bb3c4 @shlomif committed Oct 30, 2011
View
@@ -2,7 +2,9 @@
# Standalone routine to invoke a Perl program under the debugger.
# The usual boilerplate...
-use strict; use warnings; use English;
+use strict;
+use warnings;
+use English qw( -no_match_vars );
use File::Basename; use File::Spec;
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Rocky Bernstein <rockyb@rubyforge.net>
use strict; use warnings; no warnings 'redefine';
-use English;
+use English qw( -no_match_vars );
use lib '../..';
use Devel::Trepan::DB::Breakpoint;
package Devel::Trepan::BrkptMgr;
@@ -28,7 +28,7 @@ use warnings;
no warnings 'redefine';
package Devel::Trepan::CmdProcessor;
-use English;
+use English qw( -no_match_vars );
use Devel::Trepan::Util qw(hash_merge uniq_abbrev);
use vars qw(@EXPORT @ISA $eval_result);
@@ -4,7 +4,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Action;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::Condition ;
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
@@ -6,7 +6,7 @@ use lib '../../../..';
# require_relative '../../app/condition'
package Devel::Trepan::CmdProcessor::Command::Break;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command;
unless (defined(@ISA)) {
eval "use constant ALIASES => qw(b);";
@@ -4,7 +4,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Condition;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::Condition ;
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
@@ -4,7 +4,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Delete;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
@@ -4,7 +4,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Display;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::DB::Display ;
use if !defined @ISA, Devel::Trepan::Condition ;
@@ -6,7 +6,7 @@ use lib '../../../..';
# require_relative '../../app/condition'
package Devel::Trepan::CmdProcessor::Command::List;
-use English;
+use English qw( -no_match_vars );
use Devel::Trepan::DB::LineCache;
use Devel::Trepan::CmdProcessor::Validate;
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command;
@@ -5,7 +5,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Macro;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
unless (defined(@ISA)) {
eval "use constant CATEGORY => 'support';";
@@ -5,7 +5,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Restart;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
unless (defined(@ISA)) {
@@ -4,7 +4,7 @@ use warnings; no warnings 'redefine';
use lib '../../../..';
package Devel::Trepan::CmdProcessor::Command::Undisplay;
-use English;
+use English qw( -no_match_vars );
use if !defined @ISA, Devel::Trepan::CmdProcessor::Command ;
@@ -6,7 +6,7 @@ use Devel::Trepan::DB::Sub;
use Devel::Trepan::Complete;
package Devel::Trepan::CmdProcessor;
-use English;
+use English qw( -no_match_vars );
sub adjust_frame($$$)
{
@@ -7,7 +7,7 @@ use lib '../../..';
# require_relative '../app/default'
package Devel::Trepan::CmdProcessor;
-use English;
+use English qw( -no_match_vars );
use Cwd 'abs_path';
use File::Basename;
@@ -7,7 +7,7 @@ use lib '../../..';
use Devel::Trepan::Position;
package Devel::Trepan::CmdProcessor;
-use English;
+use English qw( -no_match_vars );
@@ -2,7 +2,7 @@
# Copyright (C) 2011 Rocky Bernstein <rocky@cpan.org>
use strict; use warnings;
package Devel::Trepan::Condition;
-use English;
+use English qw( -no_match_vars );
use vars qw(@EXPORT @ISA);
@EXPORT = qw( is_valid_condition );
@ISA = qw(Exporter);
View
@@ -9,7 +9,7 @@ use lib '../..';
package DB;
use feature 'switch';
use warnings; no warnings 'redefine';
-use English;
+use English qw( -no_match_vars );
use vars qw($usrctxt $running $caller
$event @ret $ret $return_value @return_value
@@ -1,6 +1,6 @@
package DB;
use warnings; no warnings 'redefine';
-use English;
+use English qw( -no_match_vars );
=head2 backtrace(skip[,count,scan_for_DB])
@@ -41,7 +41,7 @@ sub icon_char($)
package DB;
use vars qw($brkpt $package $lineno $max_bp $max_action);
use strict; use warnings; no warnings 'redefine';
-use English;
+use English qw( -no_match_vars );
BEGIN {
$DB::brkpt = undef; # current breakpoint
@@ -2,7 +2,7 @@
# Copyright (C) 2011 Rocky Bernstein <rockyb@rubyforge.net>
# FIXME: Could combine manager code from breakpoints and display
use strict; use warnings; no warnings 'redefine';
-use English;
+use English qw( -no_match_vars );
use lib '../..';
use Class::Struct;
@@ -4,7 +4,7 @@ use lib '../..';
package DB;
use warnings; use strict;
-use English;
+use English qw( -no_match_vars );
use feature 'switch';
use vars qw($eval_result @eval_result %eval_result
$eval_str $eval_opts $event $return_type );
@@ -39,7 +39,7 @@ use version; $VERSION = '0.1.0';
# A package to read and cache lines of a Perl program.
package DB::LineCache;
-use English;
+use English qw( -no_match_vars );
use strict; use warnings;
no warnings 'once';
no warnings 'redefine';
@@ -618,7 +618,7 @@ sub update_cache($;$)
# example usage
unless (caller) {
BEGIN {
- use English;
+ use English qw( -no_match_vars );
$PERLDB |= 0x400;
}; # Turn on saving @{_<$filename};
my $file=__FILE__;
@@ -4,7 +4,7 @@
package DB;
use warnings; no warnings 'redefine';
no warnings 'once';
-use English;
+use English qw( -no_match_vars );
use constant SINGLE_STEPPING_EVENT => 1;
use constant DEEP_RECURSION_EVENT => 4;
View
@@ -7,7 +7,7 @@ use Test::More 'no_plan';
note( "Testing Devel::Trepan::DB::Breakpoint" );
BEGIN {
- use English;
+ use English qw( -no_match_vars );
$PERLDB |= 0x400;
use_ok( 'Devel::Trepan::DB::Breakpoint' );
}
View
@@ -6,7 +6,7 @@ use Test::More 'no_plan';
note( "Testing Devel::Trepan::DB::LineCache" );
BEGIN {
- use English;
+ use English qw( -no_match_vars );
$PERLDB |= 0x400;
use_ok( 'Devel::Trepan::DB::LineCache' );
}
View
@@ -1,5 +1,9 @@
#!/usr/bin/env perl
-use strict; use warnings; use English;
+
+use strict;
+use warnings;
+use English qw( -no_match_vars );
+
use lib '../lib';
use Test::More 'no_plan';
View
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings; use strict;
-use English;
+use English qw( -no_match_vars );
use File::Basename;
use File::Spec;
my $trepanpl = File::Spec->catfile(dirname(__FILE__), qw(.. bin trepanpl));

1 comment on commit b64ddf6

@rocky
rocky commented on b64ddf6 Nov 4, 2011

Applied. Thanks.

Please sign in to comment.