We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I think there could be a problem with the line
$regex =~ s/[{}]//g;
in Raisin::Routes::Endpoint
sub _build_regex { my $self = shift; return $self->path if ref($self->path) eq 'Regexp'; my $regex = $self->path; $regex =~ s/(.?)([:*?])(\w+)/$self->_rep_regex($1, $2, $3)/eg; $regex =~ s/[{}]//g; # Allows any extensions $regex .= "(?:\\\.[^.]+?)?"; qr/^$regex$/; }
If I define a route_param as
resource 'backup' => sub { params ( requires('sessionId', type => Str, regex => qr/^[a-f0-9]{32}$/ ) ); route_param 'sessionId' => sub { ...
then the aforementioned line translates the regex to
'regex' => qr/^\/backup\/(?<sessionId>(?i:[a-f0-9]32))(?:\.[^.]+?)?$/,
The workaround is to remove the regex from params definition, leaving as generic Str and check it later during the execution of sub...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I think there could be a problem with the line
$regex =~ s/[{}]//g;
in Raisin::Routes::Endpoint
If I define a route_param as
then the aforementioned line translates the regex to
'regex' => qr/^\/backup\/(?<sessionId>(?i:[a-f0-9]32))(?:\.[^.]+?)?$/,
The workaround is to remove the regex from params definition, leaving as generic Str and check it later during the execution of sub...
The text was updated successfully, but these errors were encountered: