Mercurial > pub > Impl
comparison Lib/IMPL/Object/Autofill.pm @ 198:2ffe6f661605
Implemented IMPL::Web::Handler::RestController
fixes in IMPL::Serialization
completed IMPL::Web::Application::RestResource
added IMPL::Web::Handler::JSONView
added IMPL::Web::RestContract
author | cin |
---|---|
date | Fri, 20 Apr 2012 16:06:36 +0400 |
parents | d1676be8afcc |
children | c8fe3f84feba |
comparison
equal
deleted
inserted
replaced
197:6b1dda998839 | 198:2ffe6f661605 |
---|---|
80 1; | 80 1; |
81 | 81 |
82 __END__ | 82 __END__ |
83 | 83 |
84 =pod | 84 =pod |
85 | |
86 =head1 NAME | |
87 | |
88 C<IMPL::Object::Autofill> - автозаполнение объектов | |
89 | |
85 =head1 SYNOPSIS | 90 =head1 SYNOPSIS |
91 | |
92 =begin code | |
93 | |
86 package MyClass; | 94 package MyClass; |
87 use parent qw(IMPL::Object IMPL::Object::Autofill); | 95 use IMPL::declare { |
96 base => { | |
97 'IMPL::Object' => undef, | |
98 'IMPL::Object::Autofill' => '@_' | |
99 } | |
100 }; | |
88 | 101 |
89 BEGIN { | 102 BEGIN { |
90 private property PrivateData => prop_all; | 103 private property PrivateData => prop_all; |
91 public property PublicData => prop_get; | 104 public property PublicData => prop_get; |
92 } | 105 } |
93 | 106 |
94 sub CTOR { | 107 sub CTOR { |
95 my $this = shift; | 108 my $this = shift; |
96 $this->superCTOR(@_); | 109 |
97 # or eqvivalent | |
98 # $this->supercall::CTOR(@_); | |
99 | |
100 print $this->PrivateData,"\n"; | 110 print $this->PrivateData,"\n"; |
101 print $this->PublicData,"\n"; | 111 print $this->PublicData,"\n"; |
102 } | 112 } |
103 | 113 |
104 my $obj = new MyClass(PrivateData => 'private', PublicData => 'public', Other => 'some data'); | 114 my $obj = new MyClass(PrivateData => 'private', PublicData => 'public', Other => 'some data'); |
105 | 115 |
106 will print | 116 #will print |
107 private | 117 #private |
108 public | 118 #public |
119 | |
120 =end code | |
109 | 121 |
110 =cut | 122 =cut |