Skip to content

Commit a5f9cc5

Browse files
authored
Merge pull request #71 from libwww-perl/oalders/perlimports
Apply perlimports to tests
2 parents 5a681f5 + d40a181 commit a5f9cc5

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed

.github/workflows/build-and-test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Build distribution
1717
runs-on: ubuntu-latest
1818
container:
19-
image: perldocker/perl-tester:5.32
19+
image: perldocker/perl-tester:5.36
2020
steps:
2121
- uses: actions/checkout@v2
2222
- name: install aspell
@@ -28,7 +28,7 @@ jobs:
2828
EXTENDED_TESTING: 1
2929
RELEASE_TESTING: 1
3030
run: upgrade-perl-helpers && auto-build-and-test-dist
31-
- uses: actions/upload-artifact@master
31+
- uses: actions/upload-artifact@v3
3232
with:
3333
name: build_dir
3434
path: build_dir
@@ -37,10 +37,10 @@ jobs:
3737
needs: build-job
3838
runs-on: ubuntu-latest
3939
container:
40-
image: perldocker/perl-tester:5.32
40+
image: perldocker/perl-tester:5.36
4141
steps:
4242
- uses: actions/checkout@v2 # codecov wants to be inside a Git repository
43-
- uses: actions/download-artifact@master
43+
- uses: actions/download-artifact@v3
4444
with:
4545
name: build_dir
4646
path: .
@@ -70,9 +70,11 @@ jobs:
7070
- "5.28"
7171
- "5.30"
7272
- "5.32"
73+
- "5.34"
74+
- "5.36"
7375
steps:
7476
- uses: actions/checkout@v2
75-
- uses: actions/download-artifact@master
77+
- uses: actions/download-artifact@v3
7678
with:
7779
name: build_dir
7880
path: .
@@ -98,12 +100,14 @@ jobs:
98100
- "5.28"
99101
- "5.30"
100102
- "5.32"
103+
- "5.34"
104+
- "5.36"
101105
steps:
102106
- name: Set Up Perl
103107
uses: shogo82148/actions-setup-perl@v1
104108
with:
105109
perl-version: ${{ matrix.perl-version }}
106-
- uses: actions/download-artifact@master
110+
- uses: actions/download-artifact@v3
107111
with:
108112
name: build_dir
109113
path: .
@@ -137,7 +141,7 @@ jobs:
137141
with:
138142
perl-version: ${{ matrix.perl-version }}
139143
distribution: strawberry # this option only used on Windows
140-
- uses: actions/download-artifact@master
144+
- uses: actions/download-artifact@v3
141145
with:
142146
name: build_dir
143147
path: .
@@ -146,4 +150,4 @@ jobs:
146150
with:
147151
cpanfile: "cpanfile"
148152
args: "--with-suggests --with-test --with-develop"
149-
- run: cpanm --testonly -v .
153+
- run: cpanm --testonly -v .

perlimports.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Valid log levels are:
2+
# debug, info, notice, warning, error, critical, alert, emergency
3+
# critical, alert and emergency are not currently used.
4+
#
5+
# Please use boolean values in this config file. Negated options (--no-*) are
6+
# not permitted here. Explicitly set options to true or false.
7+
#
8+
# Some of these values deviate from the regular perlimports defaults. In
9+
# particular, you're encouraged to leave preserve_duplicates and
10+
# preserve_unused disabled.
11+
12+
cache = false # setting this to true is currently discouraged
13+
ignore_modules = ["Test::More"]
14+
ignore_modules_filename = ""
15+
ignore_modules_pattern = "" # regex like "^(Foo|Foo::Bar)"
16+
ignore_modules_pattern_filename = ""
17+
libs = ["lib", "t/lib"]
18+
log_filename = ""
19+
log_level = "warn"
20+
never_export_modules = []
21+
never_export_modules_filename = ""
22+
padding = true
23+
preserve_duplicates = false
24+
preserve_unused = false
25+
tidy_whitespace = true

t/cookies.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!perl -w
22

3-
use Test::More tests => 79;
3+
use HTTP::Cookies ();
4+
use HTTP::Request ();
5+
use HTTP::Response ();
6+
use URI ();
47

5-
use HTTP::Cookies;
6-
use HTTP::Request;
7-
use HTTP::Response;
8+
use Test::More tests => 79;
89

910
#-------------------------------------------------------------------
1011
# First we check that it works for the original example at
@@ -443,7 +444,6 @@ $c->extract_cookies($res);
443444

444445
print $c->as_string;
445446

446-
require URI;
447447
$req = HTTP::Request->new(POST => URI->new("http://foo.bar.acme.com/foo"));
448448
$c->add_cookie_header($req);
449449
#print $req->as_string;

t/issue26.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use strict;
22
use Test::More;
3-
use HTTP::Cookies;
4-
use HTTP::Response;
5-
use HTTP::Request;
3+
use HTTP::Cookies ();
4+
use HTTP::Response ();
5+
use HTTP::Request ();
66

77
my $CRLF="\015\012";
88

t/issue32.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use strict;
22
use warnings;
33
use Test::More;
44

5-
use HTTP::Cookies;
6-
use HTTP::Request;
7-
use HTTP::Response;
5+
use HTTP::Cookies ();
6+
use HTTP::Request ();
7+
use HTTP::Response ();
88

99
my $nextyear = 1901+(gmtime())[5];
1010

0 commit comments

Comments
 (0)