khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
62 stars 31 forks source link

Example shows '/users should be 'user' #1

Closed LLFourn closed 10 years ago

LLFourn commented 10 years ago

If you do

namespace '/user' => sub {

you get '//user' as the route

 raisin --routes api.pl
  GET     //user
  GET     //user/all
  POST    //user
  GET     //user/{id}

PS the example also has a mistake:

    sub {
        get sub {
            my $params = shift;
            %USERS{ $params->{id} };
        };
    };

should be $USERS

khrt commented 10 years ago

Thank you for feedback. Fixed.