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

Support regex in prefix

Open
#1,401 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
perl
Domain
backend

Research direction

Start by locating the prefix route handling and its existing parameter-matching behavior. Reproduce the example with a regex constraint, confirming that /user/17dec/page matches and /user/CAPI-TALS/page does not while captures->{user} remains available. Done means prefix accepts the regex form and the demonstrated matching behavior is covered.

Written by the indexing model from the issue text.

Description

Enhancement

This would allow for additional input validation to be done directly in the route, which is not possible with plain route parameters. E.g.

prefix qr{/user/(?<user>[a-z0-9]{3,16})}, sub {
  get '/page' => sub {
    my $user = captures->{user};
  }
};
# Should match: /user/17dec/page
# Fails to match: /user/CAPI-TALS/page
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.