Skip to content
New issue

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

keyword "delete" doesn't work #12

Closed
celogeek opened this issue Nov 12, 2011 · 5 comments
Closed

keyword "delete" doesn't work #12

celogeek opened this issue Nov 12, 2011 · 5 comments

Comments

@celogeek
Copy link
Contributor

I have test the DELETE keyword.

"delete" is a perl core command, it's used for delete a key in a hash or an array, so we can't use it in the keywords name space.

This code give me an error :

use Dancer;
set serializer => 'JSON';

delete '/login' => sub {
return { response => 'OK' };
};

start;

@ambs
Copy link
Member

ambs commented Nov 12, 2011

Huh, it should be 'del', like dancer 1 :S

@celogeek
Copy link
Contributor Author

I have found the "del" method which should fix the issue but it call itself in deep recursion. I purpose a patch.

@ambs
Copy link
Member

ambs commented Nov 12, 2011

See my patch. It's there already :)

@ambs
Copy link
Member

ambs commented Nov 12, 2011

LOL, ok, another patch at #14.
Mine uses one less function call, but I'll leave it up to @sukria do decide what do choose :)

@celogeek
Copy link
Contributor Author

Okay :) good idea, for your point. let @sukria choose :)

@sukria sukria closed this as completed Nov 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants