Mercurial > pub > Impl
comparison Lib/IMPL/Config.pm @ 165:76515373dac0
Added Class::Template,
Rewritten SQL::Schema
'use parent' directive instead of 'use base'
| author | wizard |
|---|---|
| date | Sat, 23 Apr 2011 23:06:48 +0400 |
| parents | 2f31ecabe9ea |
| children | b88b7fe60aa3 |
comparison
equal
deleted
inserted
replaced
| 164:eb3e9861a761 | 165:76515373dac0 |
|---|---|
| 1 package IMPL::Config; | 1 package IMPL::Config; |
| 2 use strict; | 2 use strict; |
| 3 use warnings; | 3 use warnings; |
| 4 | 4 |
| 5 use base qw(IMPL::Object::Accessor IMPL::Object::Serializable IMPL::Object::Autofill); | 5 use parent qw(IMPL::Object::Accessor IMPL::Object::Serializable IMPL::Object::Autofill); |
| 6 | 6 |
| 7 __PACKAGE__->PassThroughArgs; | 7 __PACKAGE__->PassThroughArgs; |
| 8 | 8 |
| 9 use IMPL::Class::Member; | 9 use IMPL::Class::Member; |
| 10 use IMPL::Class::PropertyInfo; | 10 use IMPL::Class::PropertyInfo; |
| 127 =begin code | 127 =begin code |
| 128 | 128 |
| 129 # define application | 129 # define application |
| 130 | 130 |
| 131 package MyApp; | 131 package MyApp; |
| 132 use base qw(IMPL::Config); | 132 use parent qw(IMPL::Config); |
| 133 | 133 |
| 134 use IMPL::Class::Property; | 134 use IMPL::Class::Property; |
| 135 use IMPL::Config::Class; | 135 use IMPL::Config::Class; |
| 136 | 136 |
| 137 BEGIN { | 137 BEGIN { |
| 182 | 182 |
| 183 C<[Serializable]> | 183 C<[Serializable]> |
| 184 | 184 |
| 185 C<[Autofill]> | 185 C<[Autofill]> |
| 186 | 186 |
| 187 C<use base IMPL::Object::Accessor> | 187 C<use parent IMPL::Object::Accessor> |
| 188 | 188 |
| 189 Базовый класс для приложений. Использует подход, что приложение | 189 Базовый класс для приложений. Использует подход, что приложение |
| 190 является объектом, состояние которого предтавляет собой конфигурацию, | 190 является объектом, состояние которого предтавляет собой конфигурацию, |
| 191 а методы - логику. | 191 а методы - логику. |
| 192 | 192 |
