Skip to content

Commit

Permalink
fixed partial route handling in routes command
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 29, 2013
1 parent f048068 commit 6850250
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@

4.22 2013-07-30
- Improved Mojo::Server to use FindBin more defensively.
- Fixed partial route handling in routes command.

4.21 2013-07-29
- Added strip method to Mojo::DOM.
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojolicious/Command/routes.pm
Expand Up @@ -51,7 +51,8 @@ sub _draw {
my $format = (regexp_pattern($pattern->format_regex || ''))[0];
my $optional
= !$pattern->constraints->{format} || $pattern->defaults->{format};
$regex .= $optional ? "(?:$format)?" : $format if $format;
$regex .= $optional ? "(?:$format)?" : $format
if $format && !$node->[0]->partial;
push @parts, $regex if $verbose;

say encode('UTF-8', join(' ', @parts));
Expand Down

0 comments on commit 6850250

Please sign in to comment.