Skip to content

Commit 8b1b46c

Browse files
committed
various tests: replace BEGIN/require/import by use
That is, turn BEGIN { require Foo; Foo->import(...); } into use Foo ...; (Except for a few tests that did the `require Config; Config->import` dance without actually using `%Config` anywhere, so I just deleted the import code.)
1 parent 650608f commit 8b1b46c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+49
-67
lines changed

dist/I18N-Collate/t/I18N-Collate.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use strict;
77
no warnings;
88

9+
use Config;
910
BEGIN {
10-
require Config; Config->import;
1111
if (!$::Config{d_setlocale} || $::Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
1212
print "1..0\n";
1313
exit;

dist/IO/t/io_linenum.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ my $File;
77

88
BEGIN {
99
$File = __FILE__;
10-
require strict; strict->import();
1110
}
11+
use strict;
1212

1313
use Test::More tests => 12;
1414

dist/Safe/t/safe1.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!./perl -w
22
$|=1;
3+
use Config;
34
BEGIN {
4-
require Config; Config->import;
55
if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
66
print "1..0\n";
77
exit 0;

dist/Safe/t/safe2.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!./perl -w
22
$|=1;
3+
use Config;
34
BEGIN {
4-
require Config; Config->import;
55
if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
66
print "1..0\n";
77
exit 0;

dist/Safe/t/safe3.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!perl -w
22

3+
use Config;
34
BEGIN {
4-
require Config; Config->import;
55
if ($Config{'extensions'} !~ /\bOpcode\b/
66
&& $Config{'extensions'} !~ /\bPOSIX\b/
77
&& $Config{'osname'} ne 'VMS')

dist/Safe/t/safeload.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!perl
22

3+
use Config;
34
BEGIN {
4-
require Config;
5-
Config->import;
65
if ($Config{'extensions'} !~ /\bOpcode\b/) {
76
print "1..0\n";
87
exit 0;

dist/Safe/t/saferegexp.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!perl -w
22

3+
use Config;
34
BEGIN {
4-
require Config; Config->import;
55
if ($Config{'extensions'} !~ /\bOpcode\b/) {
66
print "1..0\n";
77
exit 0;

dist/Safe/t/safesecurity.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!perl
22

3+
use Config;
34
BEGIN {
4-
require Config;
5-
Config->import;
65
if ($Config{'extensions'} !~ /\bOpcode\b/) {
76
print "1..0\n";
87
exit 0;

dist/Safe/t/safesig.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!perl
22

3+
use Config;
34
BEGIN {
4-
require Config;
5-
Config->import;
65
if ($Config{'extensions'} !~ /\bOpcode\b/) {
76
print "1..0\n";
87
exit 0;

dist/Safe/t/safesort.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!perl -w
22
$|=1;
3+
use Config;
34
BEGIN {
4-
require Config; Config->import;
55
if ($Config{'extensions'} !~ /\bOpcode\b/ && $Config{'osname'} ne 'VMS') {
66
print "1..0\n";
77
exit 0;

0 commit comments

Comments
 (0)