comparison Lib/IMPL/Web/Application/RestResource.pm @ 212:292226770180

bugfixes
author sergey
date Fri, 29 Jun 2012 19:24:15 +0400
parents 5146e17a7b76
children e9fd7ff3f54c
comparison
equal deleted inserted replaced
211:2b9b55cfb79b 212:292226770180
30 public property enableForms => PROP_GET | PROP_OWNERSET; 30 public property enableForms => PROP_GET | PROP_OWNERSET;
31 31
32 } 32 }
33 33
34 sub CTOR { 34 sub CTOR {
35 my ($this) = @_; 35 my ($this,%args) = @_;
36 36
37 die ArgumentException->new("target") unless $this->target; 37 die ArgumentException->new("target") unless $this->target;
38 38
39 $this->final($this->childRegex ? 0 : 1); 39 $this->final($this->childRegex ? 0 : 1);
40 $this->methods({}) unless $this->methods; 40 $this->methods({}) unless $this->methods;
41
42 $this->index($this->get) unless defined $this->index;
41 43
42 if ($this->enableForms) { 44 if ($this->enableForms) {
43 $this->methods->{create} = { 45 $this->methods->{create} = {
44 get => $this->get, 46 get => $this->get,
45 post => $this->post, 47 post => $this->post,