GET POST
- Ever write this?
sub action :Whatever {
my ($self, $c) = @_;
if($c->request->method eq 'GET'){
# GET
}
elsif($c->request->method eq 'POST'){
# POST
}
}
- Too much code!
| Catalyst | Improving your Catalyst Application | #18 |
sub action :Whatever {
my ($self, $c) = @_;
if($c->request->method eq 'GET'){
# GET
}
elsif($c->request->method eq 'POST'){
# POST
}
}
| Infinity Interactive |