Skip to content

Commit 8729b9c

Browse files
committed
Perl::Critic updates
1 parent db4d9f8 commit 8729b9c

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

MANIFEST

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Changes
22
Makefile.PL
33
MANIFEST
4+
perlcriticrc
45

56
bin/mech-dump
67

Makefile.PL

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tags:
115115
--languages=Perl --langmap=Perl:+.t \
116116
117117
critic:
118-
perlcritic -1 .
118+
perlcritic -1 -q -profile perlcriticrc bin/ lib/ t/
119119
120120
MAKE_FRAG
121121
}

perlcriticrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[-CodeLayout::ProhibitParensWithBuiltins]
2+
[CodeLayout::ProhibitHardTabs]
3+
allow_leading_tabs = 0
4+
5+
[-CodeLayout::RequireTidyCode]
6+
7+
[-ControlStructures::ProhibitPostfixControls]
8+
9+
[-Documentation::RequirePodAtEnd]
10+
[-Documentation::RequirePodSections]
11+
12+
[-Editor::RequireEmacsFileVariables]
13+
[-ErrorHandling::RequireCarping]
14+
15+
[-InputOutput::ProhibitInteractiveTest]
16+
[-InputOutput::ProhibitBacktickOperators]
17+
18+
[-Miscellanea::RequireRcsKeywords]
19+
20+
[-Modules::RequireVersionVar]
21+
22+
[-RegularExpressions::RequireExtendedFormatting]
23+
[-RegularExpressions::RequireLineBoundaryMatching]
24+
25+
[-ValuesAndExpressions::ProhibitEmptyQuotes]
26+
27+
[-Variables::ProhibitPunctuationVars]

t/form-parsing.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ my $base = 'http://localhost/';
99
my $content = do { local $/ = undef; <DATA> };
1010

1111
my $forms = [ HTML::Form->parse( $content, $base ) ];
12-
is( scalar @$forms, 1, 'Find one form, please' );
12+
is( scalar @{$forms}, 1, 'Find one form, please' );
1313

1414
__DATA__
1515
<html>

t/form_with_fields.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ ok( $mech->success, "Fetched $uri" ) or die q{Can't get test page};
2626
{
2727
my $form = $mech->form_with_fields(qw/1b/);
2828
isa_ok( $form, 'HTML::Form' );
29-
is($form->attr('name'), '1st_form');
29+
is($form->attr('name'), '1st_form', 'first form matches');
3030
}
3131

3232
{
3333
my $form = $mech->form_with_fields('1b', 'opt[2]');
3434
isa_ok( $form, 'HTML::Form' );
35-
is($form->attr('name'), '2nd_form');
35+
is($form->attr('name'), '2nd_form', 'second form matches');
3636
}
3737

3838
{

0 commit comments

Comments
 (0)