Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Document how write a Dancer2 CGI app

Open
#1,679 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
perl
Domain
documentation

Research direction

Start with the CGI application example in the issue and inspect the repository's existing documentation structure to find the appropriate location. Document the demonstrated Dancer2 CGI setup, including the embedded templates, so a reader can follow it as a complete example.

Written by the indexing model from the issue text.

Description

Beginner Suitable Documentation

I worked with @xsawyerx today and we figured out how to write a Dancer2 app in CGI. We feel like it should be documented but we're not sure where:

use Dancer2;
use Plack::Loader;
use Template::Provider::FromDATA;

# Tell Dancer to use the DATA section for templates                                                                                                                                                                                                                                                                                                                                                     
my $provider = Template::Provider::FromDATA->new( { CLASSES => __PACKAGE__ } );
set engines => {template => { template_toolkit => { LOAD_TEMPLATES => [ $provider ] }}};
set template => 'template_toolkit';

get '/' => sub {
    template 'mytemplate' => { bar => "foo" };
};
Plack::Loader->auto->run(main->to_app);

__DATA__                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                        
__mytemplate.tt__                                                                                                                                                                                                                                                                                                                                                                                       
Flib [% bar %]                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                        
__anothertemplate.tt__                                                                                                                                                                                                                                                                                                                                                                                  
Something else here.
Dominant language
Perl
Stars
604
Forks
287
Avg merge
1d 9h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerlDancer/Dancer2

All issues in PerlDancer/Dancer2

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.