Skip to content

Commit 97216b9

Browse files
committed
convert to Dist::Zilla
1 parent 7507fc8 commit 97216b9

File tree

9 files changed

+468
-40
lines changed

9 files changed

+468
-40
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
7+
end_of_line = lf
8+
charset = utf-8
9+
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.{yml,yaml}]
14+
indent_size = 2
15+
quote_type = single
16+
17+
[Changes]
18+
indent_size = 2

.github/workflows/test.yml

+182
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
name: Test
2+
on:
3+
push: ~
4+
pull_request: ~
5+
6+
jobs:
7+
perl-versions:
8+
runs-on: ubuntu-latest
9+
name: Calculate Perl Versions
10+
outputs:
11+
versions: ${{ steps.perl-versions.outputs.perl-versions }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Extract perl dependecy
15+
id: prereqs
16+
uses: perl-actions/get-prereqs@v1
17+
with:
18+
sources: prereqs.yml
19+
- id: perl-versions
20+
uses: perl-actions/perl-versions@v1
21+
with:
22+
since-perl: ${{ steps.prereqs.outputs.perl }}
23+
with-devel: true
24+
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/cache@v4
30+
with:
31+
path: ~/.perl-cpm
32+
key: cpm-${{ runner.os }}
33+
- name: Setup local::lib
34+
run: |
35+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
36+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
37+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
38+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
39+
- name: Extract Dist::Zilla dependencies
40+
id: authordeps
41+
uses: perl-actions/get-prereqs@v1
42+
with:
43+
sources: dist.ini
44+
phases: author
45+
- name: Install authordeps
46+
uses: perl-actions/install-with-cpm@v1
47+
with:
48+
sudo: false
49+
install: ${{ steps.authordeps.outputs.prereqs }}
50+
- name: Build
51+
id: build
52+
run: |
53+
DZIL_COLOR=1 dzil build --no-tgz | tee "/tmp/dzil-build.log"
54+
echo build="$(grep --only-matching 'built in .*' "/tmp/dzil-build.log" | tail -1 | cut -c10-)" >> "$GITHUB_OUTPUT"
55+
- name: Upload build
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ steps.build.outputs.build }}
59+
path: ${{ steps.build.outputs.build }}
60+
include-hidden-files: true
61+
outputs:
62+
name: ${{ steps.build.outputs.build }}
63+
64+
test:
65+
needs:
66+
- perl-versions
67+
- build
68+
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
perl-version: ${{ fromJson(needs.perl-versions.outputs.versions) }}
73+
74+
runs-on: ubuntu-latest
75+
container:
76+
image: perl:${{ matrix.perl-version }}-buster
77+
78+
env:
79+
AUTOMATED_TESTING: 1
80+
PERL_USE_UNSAFE_INC: 0
81+
82+
steps:
83+
- name: Download build
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: ${{ needs.build.outputs.name }}
87+
- uses: actions/cache@v4
88+
with:
89+
path: ~/.perl-cpm
90+
key: cpm-perl:${{ matrix.perl-version }}-buster
91+
- name: Setup local::lib
92+
run: |
93+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
94+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
95+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
96+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
97+
- name: Extract configure dependecies
98+
id: configure
99+
uses: perl-actions/get-prereqs@v1
100+
with:
101+
phases: configure
102+
- name: Install configure deps
103+
uses: perl-actions/install-with-cpm@v1
104+
with:
105+
sudo: false
106+
install: ${{ steps.configure.outputs.prereqs }}
107+
- name: Run Makefile.PL
108+
run: perl Makefile.PL
109+
- name: Extract dependecies
110+
id: prereqs
111+
uses: perl-actions/get-prereqs@v1
112+
with:
113+
phases: build test runtime
114+
relationships: requires recommends suggests
115+
- name: Install deps
116+
uses: perl-actions/install-with-cpm@v1
117+
with:
118+
sudo: false
119+
install: ${{ steps.prereqs.outputs.prereqs }}
120+
- name: Run the tests
121+
run: make test
122+
env:
123+
AUTHOR_TESTING: 1
124+
125+
test-xt:
126+
needs:
127+
- perl-versions
128+
- build
129+
130+
runs-on: ubuntu-latest
131+
container:
132+
image: perl:5.36-buster
133+
134+
env:
135+
AUTOMATED_TESTING: 1
136+
137+
steps:
138+
- name: Download build
139+
uses: actions/download-artifact@v4
140+
with:
141+
name: ${{ needs.build.outputs.name }}
142+
- uses: actions/cache@v4
143+
with:
144+
path: ~/.perl-cpm
145+
key: cpm-perl:5.36-buster
146+
- name: Setup local::lib
147+
run: |
148+
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
149+
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5:$PERL5LIB" >> "$GITHUB_ENV"
150+
echo "PERL_MB_OPT=--install_base $RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
151+
echo "PERL_MM_OPT=INSTALL_BASE=$RUNNER_TEMP/perl5" >> "$GITHUB_ENV"
152+
- name: Extract configure dependecies
153+
id: configure
154+
uses: perl-actions/get-prereqs@v1
155+
with:
156+
phases: configure
157+
- name: Install configure deps
158+
uses: perl-actions/install-with-cpm@v1
159+
with:
160+
sudo: false
161+
install: ${{ steps.configure.outputs.prereqs }}
162+
- name: Run Makefile.PL
163+
run: perl Makefile.PL
164+
- name: Extract dependecies
165+
id: prereqs
166+
uses: perl-actions/get-prereqs@v1
167+
with:
168+
phases: build test runtime develop
169+
relationships: requires recommends suggests
170+
- name: Install deps
171+
uses: perl-actions/install-with-cpm@v1
172+
with:
173+
sudo: false
174+
install: ${{ steps.prereqs.outputs.prereqs }}
175+
- name: Run the xt tests
176+
run: prove -l xt
177+
env:
178+
AUTHOR_TESTING: 1
179+
- name: Run the xt/author tests
180+
run: prove -lr xt/author
181+
env:
182+
AUTHOR_TESTING: 1

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/MANIFEST.bak
2+
/Makefile.old
3+
/Makefile
4+
/blib/
5+
/pm_to_blib
6+
/MYMETA.json
7+
/MYMETA.yml
8+
/cover_db/
9+
/MYMETA.json.lock
10+
/MANIFEST
11+
/.build/
12+
/Catalyst-Action-RenderView-*.tar.gz
13+
/Catalyst-Action-RenderView-*/

.perlcriticrc

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
severity = 1
2+
verbose = 9
3+
only = 1
4+
5+
[BuiltinFunctions::ProhibitLvalueSubstr]
6+
[BuiltinFunctions::ProhibitShiftRef]
7+
[BuiltinFunctions::ProhibitSleepViaSelect]
8+
[BuiltinFunctions::ProhibitStringyEval]
9+
[BuiltinFunctions::ProhibitUniversalCan]
10+
[BuiltinFunctions::ProhibitUniversalIsa]
11+
[BuiltinFunctions::ProhibitVoidGrep]
12+
[BuiltinFunctions::ProhibitVoidMap]
13+
[BuiltinFunctions::RequireGlobFunction]
14+
[BuiltinFunctions::RequireSimpleSortBlock]
15+
[ClassHierarchies::ProhibitOneArgBless]
16+
[CodeLayout::ProhibitHardTabs]
17+
[CodeLayout::RequireConsistentNewlines]
18+
[ControlStructures::ProhibitCascadingIfElse]
19+
[ControlStructures::ProhibitDeepNests]
20+
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
21+
[ControlStructures::ProhibitMutatingListFunctions]
22+
[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
23+
[ControlStructures::ProhibitUnreachableCode]
24+
[ControlStructures::ProhibitYadaOperator]
25+
[ErrorHandling::RequireCheckingReturnValueOfEval]
26+
[InputOutput::ProhibitBacktickOperators]
27+
[InputOutput::ProhibitBarewordFileHandles]
28+
[InputOutput::ProhibitExplicitStdin]
29+
[InputOutput::ProhibitInteractiveTest]
30+
[InputOutput::ProhibitJoinedReadline]
31+
[InputOutput::ProhibitOneArgSelect]
32+
[InputOutput::ProhibitReadlineInForLoop]
33+
[InputOutput::ProhibitTwoArgOpen]
34+
[InputOutput::RequireCheckedOpen]
35+
[InputOutput::RequireEncodingWithUTF8Layer]
36+
[Miscellanea::ProhibitFormats]
37+
[Miscellanea::ProhibitUnrestrictedNoCritic]
38+
[Modules::ProhibitAutomaticExportation]
39+
[Modules::ProhibitConditionalUseStatements]
40+
[Modules::ProhibitEvilModules]
41+
[Modules::ProhibitExcessMainComplexity]
42+
[Modules::RequireBarewordIncludes]
43+
[Modules::RequireEndWithOne]
44+
[Modules::RequireFilenameMatchesPackage]
45+
[NamingConventions::ProhibitAmbiguousNames]
46+
[Objects::ProhibitIndirectSyntax]
47+
[RegularExpressions::ProhibitCaptureWithoutTest]
48+
[RegularExpressions::ProhibitComplexRegexes]
49+
[RegularExpressions::ProhibitUnusedCapture]
50+
[Subroutines::ProhibitBuiltinHomonyms]
51+
[Subroutines::ProhibitExcessComplexity]
52+
max_mccabe = 30
53+
[Subroutines::ProhibitExplicitReturnUndef]
54+
[Subroutines::ProhibitManyArgs]
55+
[Subroutines::ProhibitNestedSubs]
56+
[Subroutines::ProhibitReturnSort]
57+
[Subroutines::ProhibitUnusedPrivateSubroutines]
58+
[Subroutines::ProtectPrivateSubs]
59+
[TestingAndDebugging::ProhibitProlongedStrictureOverride]
60+
[TestingAndDebugging::RequireTestLabels]
61+
[TestingAndDebugging::RequireUseStrict]
62+
[TestingAndDebugging::RequireUseWarnings]
63+
[ValuesAndExpressions::ProhibitCommaSeparatedStatements]
64+
[ValuesAndExpressions::ProhibitComplexVersion]
65+
[ValuesAndExpressions::ProhibitImplicitNewlines]
66+
[ValuesAndExpressions::ProhibitLeadingZeros]
67+
[ValuesAndExpressions::ProhibitMismatchedOperators]
68+
[ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters]
69+
[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator]
70+
[ValuesAndExpressions::RequireQuotedHeredocTerminator]
71+
[Variables::ProhibitAugmentedAssignmentInDeclaration]
72+
allow_our = 1
73+
[Variables::ProhibitConditionalDeclarations]
74+
[Variables::ProhibitMatchVars]
75+
[Variables::ProhibitReusedNames]
76+
[Variables::ProhibitUnusedVariables]
77+
[Variables::ProtectPrivateVars]
78+
[Variables::RequireInitializationForLocalVars]
79+
[Variables::RequireLexicalLoopIterators]
80+
[Variables::RequireLocalizedPunctuationVars]
81+
[Variables::RequireNegativeIndices]

Changes

+32-28
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,63 @@
1+
Revision history for Perl extension Catalyst-Action-RenderView
2+
3+
{{ $NEXT }}
4+
15
0.16 2011-01-05 19:28:00 GMT
2-
- Fix bug accidentally introduced in the last version with response
3-
3xx statuses.
6+
- Fix bug accidentally introduced in the last version with response
7+
3xx statuses.
48

59
0.15 2011-01-04 14:19:36 CET
6-
- Don't delegate to a view if the response body is set to `undef'.
7-
- Make sure a Test::More with done_testing support is available.
10+
- Don't delegate to a view if the response body is set to `undef'.
11+
- Make sure a Test::More with done_testing support is available.
812

913
0.14 2009-12-03 03:13:23 GMT
10-
- Remove warnings from tests about actions in the app root
14+
- Remove warnings from tests about actions in the app root
1115

1216
0.13 2009-10-24 04:48:03 PDT
13-
- Re-release 0.12 without changes for reindexing by CPAN/PAUSE.
17+
- Re-release 0.12 without changes for reindexing by CPAN/PAUSE.
1418

1519
0.12 2009-10-18 19:10:00 BST
16-
- Fixup copyright information
20+
- Fixup copyright information
1721

1822
0.11 2009-06-28 19:29:16
19-
- Update Module::Install to 0.87 to unbreak auto_install.
20-
No functional changes.
23+
- Update Module::Install to 0.87 to unbreak auto_install.
24+
No functional changes.
2125

2226
0.10 2009-04-29 18:24:50
23-
- Depend on Data::Visitor 0.24 to avoid Class::MOP deprecation
24-
warnings. (Florian Ragwitz)
27+
- Depend on Data::Visitor 0.24 to avoid Class::MOP deprecation
28+
warnings. (Florian Ragwitz)
2529

2630
0.09 2009-02-18 21:32:00
27-
- Store config in $c->config->{'Action::RenderView'}
28-
instead of $c->config->{debug}.
29-
Config from $c->config->{debug} is deprecated, but
30-
still supported.
31-
- Switch from NEXT to next::method
31+
- Store config in $c->config->{'Action::RenderView'}
32+
instead of $c->config->{debug}.
33+
Config from $c->config->{debug} is deprecated, but
34+
still supported.
35+
- Switch from NEXT to next::method
3236

3337
0.08 2008-05-02 19:40:00
34-
- Add AsCGI to list of test requirements.
35-
- Check for defined()ness of $c->res->body so "0" is valid. (RT #30564)
38+
- Add AsCGI to list of test requirements.
39+
- Check for defined()ness of $c->res->body so "0" is valid. (RT #30564)
3640

3741
0.07 2007-09-01 11:03:00
38-
- Add DateTime to default list of scrubbed objects
39-
- Stringify rather than ref by default ,
40-
more explicit message
42+
- Add DateTime to default list of scrubbed objects
43+
- Stringify rather than ref by default ,
44+
more explicit message
4145

4246
0.06 2007-08-29 16:35:00
43-
- Add support for scrubbing stash objects.
44-
- Remove undef warning
47+
- Add support for scrubbing stash objects.
48+
- Remove undef warning
4549

4650
0.05 2007-04-26
47-
- switch to Module::Install
51+
- switch to Module::Install
4852

4953
0.04 2006-07-04 09:21:00
50-
- That debug code wasn't quite production ready : /
54+
- That debug code wasn't quite production ready : /
5155

5256
0.03 2006-07-02 11:26:00
53-
- Forgot to update use test as well, silly git.
57+
- Forgot to update use test as well, silly git.
5458

5559
0.02 2006-06-29 14:59:00
56-
- Oops, moved content check ending brace up.
60+
- Oops, moved content check ending brace up.
5761

5862
0.01 2006-06-26 17:14:00
59-
- Initial release
63+
- Initial release

0 commit comments

Comments
 (0)