Very cryptic and bizarre. Although I've always been pleased with the Dancer2 documentation, I don't believe I've ever used that functionality before. I don't like how odd the 'help' messages are.

Here's what I've got on v0.301004:

steve@maezi ~/scratch >dancer2 -a Unknown option: a Usage: dancer2 [-h] -h --help --man [subcommand] at /Users/steve/perl5 +/perlbrew/perls/perl-5.32.1/lib/site_perl/5.32.1/CLI/Osprey/Descripti +ve/Usage.pm line 329. steve@maezi ~/scratch >dancer2 -h Usage: dancer2 [-h] [-h] [--help] [--man] [subcommand] Subcommands available: gen | version -h show a short help message --help show a long help message --man show the manual steve@maezi ~/scratch >dancer2 gen application is missing Usage: dancer2 gen [-acdghoprsx] [-p|--path directory] [-a|--applicati +on appname] [-d|--directory directory] [-c|--docker] [-g|--git] [-x|--no-check] [-o|--overwrite] [-r|--remo +te URI] [-s|--skel directory] [-h] [--help] [--man]

...ahh, looks like we may be getting somewhere!

steve@maezi ~/scratch >dancer2 gen --help Usage: dancer2 gen [-acdghoprsx] [-p|--path directory] [-a|--applicati +on appname] [-d|--directory directory] [-c|--docker] [-g|--git] [-x|--no-check] [-o|--overwrite] [-r|--remo +te URI] [-s|--skel directory] [-h] [--help] [--man] -p|--path directory application path (default: current directory +) -a|--application appname application name -d|--directory directory application directory (default: same as appl +ication name) -c|--docker create a dockerfile (container definition) -g|--git init git repository -x|--no-check don't check latest Dancer2 version (default: + check - requires internet) -o|--overwrite overwrite existing files -r|--remote URI URI for git repository (implies -g) -s|--skel directory skeleton directory -h show a short help message --help show a long help message --man show the manual

Let's try it:

steve@maezi ~/scratch >dancer2 gen -a AppName The latest stable Dancer2 release is 0.400000. You are currently using + 0.301004. Please check https://metacpan.org/pod/Dancer2/ for updates. + AppName + AppName/cpanfile + AppName/MANIFEST.SKIP + AppName/config.yml + AppName/Makefile.PL + AppName/.dancer + AppName/bin + AppName/bin/app.psgi + AppName/environments + AppName/environments/production.yml + AppName/environments/development.yml + AppName/t + AppName/t/001_base.t + AppName/t/002_index_route.t + AppName/public + AppName/public/favicon.ico + AppName/public/dispatch.cgi + AppName/public/500.html + AppName/public/404.html + AppName/public/dispatch.fcgi + AppName/lib + AppName/lib/AppName.pm + AppName/views + AppName/views/index.tt + AppName/public/css + AppName/public/css/style.css + AppName/public/css/error.css + AppName/public/images + AppName/public/images/perldancer-bg.jpg + AppName/public/images/perldancer.jpg + AppName/public/javascripts + AppName/public/javascripts/jquery.js + AppName/views/layouts + AppName/views/layouts/main.tt Your new application is ready! To run it: cd AppName plackup bin/app.psgi To access your application, point your browser to http://localhost:500 +0 If you need community assistance, the following resources are availabl +e: - Dancer website: https://perldancer.org - Twitter: https://twitter.com/PerlDancer/ - GitHub: https://github.com/PerlDancer/Dancer2/ - Mailing list: https://lists.perldancer.org/mailman/listinfo/dancer-u +sers - IRC: irc.perl.org#dancer Happy Dancing!

So it appears as though the tutorial is missing the gen keyword/command. If I get a chance tomorrow morning, I'll create a pull request with the fix (unless someone beats me to it).


In reply to Re: Starting out with Dancer and falling at the first hurdle by stevieb
in thread Starting out with Dancer and falling at the first hurdle by LittleJack

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.