dancer2 gen -n tutorial puts schema classes in a "My::App" directory
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
The bad path comes from the rename in _copy_templates in lib/Dancer2/CLI/Gen.pm (around line 359), which inserts the app name without converting :: to a path separator. Reproduce with dancer2 gen -n tutorial -a My::App, then check where Schema.pm lands. Done when the file is at lib/My/App/Schema.pm and use My::App::Schema resolves. Check with the #1849 discussion before changing the same rename.
Written by the indexing model from the issue text.
Description
With a namespaced app name, the tutorial skeleton writes its schema classes under a directory with colons in the name:
$ dancer2 gen -n tutorial -a My::App
$ find My-App -name 'Schema*.pm'
My-App/lib/My::App/Schema.pm
That should be lib/My/App/Schema.pm, or use My::App::Schema won't find it. On Windows it can't be created at all, since : isn't legal in a file name there.
The rename in _copy_templates (lib/Dancer2/CLI/Gen.pm:359) drops in the app name as-is without turning :: into a path separator. Probably worth fixing alongside #1849, since it's the same rename.
- Dominant language
- Perl
- Stars
- 604
- Forks
- 287
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerlDancer/Dancer2
-
Add .gitattributes so share/skel keeps LF on a Windows git checkoutPossibly taken @sadhana-s-codez claimed this 2 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
PerlDancer/Dancer2#1854 · 1 comment ·
Maintainers usually reply within 1 day
-
dancer2 gen -c writes the Dockerfile outside the app directoryPossibly taken @sjh9714 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
PerlDancer/Dancer2#1851 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
PerlDancer/Dancer2#1820 ·
Maintainers usually reply within 1 day
-
Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
PerlDancer/Dancer2#1819 ·
Maintainers usually reply within 1 day
-
Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PerlDancer/Dancer2#1817 ·
Maintainers usually reply within 1 day
All issues in PerlDancer/Dancer2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
jimsalterjrs/sanoid#1116 · 1 reaction ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
major/MySQLTuner-perl#1007 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
bioconda/bioconda-recipes#70187 ·
Maintainers usually reply within 2 days