Mercurial > pub > Impl
comparison Lib/IMPL/Serialization/XmlFormatter.pm @ 166:4267a2ac3d46
Added Class::Template,
Rewritten SQL::Schema
'use parent' directive instead of 'use base'
author | wizard |
---|---|
date | Sat, 23 Apr 2011 23:12:06 +0400 |
parents | dc1da0389db7 |
children | 4ddb27ff4a0b |
comparison
equal
deleted
inserted
replaced
165:76515373dac0 | 166:4267a2ac3d46 |
---|---|
1 package IMPL::Serialization::XmlObjectWriter; | 1 package IMPL::Serialization::XmlObjectWriter; |
2 use strict; | 2 use strict; |
3 | 3 |
4 use base qw(IMPL::Object); | 4 use parent qw(IMPL::Object); |
5 use IMPL::Class::Property; | 5 use IMPL::Class::Property; |
6 use IMPL::Class::Property::Direct; | 6 use IMPL::Class::Property::Direct; |
7 | 7 |
8 use IMPL::Serialization; | 8 use IMPL::Serialization; |
9 use XML::Writer; | 9 use XML::Writer; |
123 return 0 if not $_[0]; | 123 return 0 if not $_[0]; |
124 return $_[0] =~ /^(_|\w|\d)+$/; | 124 return $_[0] =~ /^(_|\w|\d)+$/; |
125 } | 125 } |
126 | 126 |
127 package IMPL::Serialization::XmlObjectReader; | 127 package IMPL::Serialization::XmlObjectReader; |
128 use base qw(XML::Parser); | 128 use parent qw(XML::Parser); |
129 | 129 |
130 sub new { | 130 sub new { |
131 my $class = shift; | 131 my $class = shift; |
132 my %args = @_; | 132 my %args = @_; |
133 die new Exception("Handler parameter is reqired") if not $args{'Handler'}; | 133 die new Exception("Handler parameter is reqired") if not $args{'Handler'}; |
166 $this->{'Non-Expat-Options'}->{'Handler'}->OnObjectData($text); | 166 $this->{'Non-Expat-Options'}->{'Handler'}->OnObjectData($text); |
167 return 1; | 167 return 1; |
168 } | 168 } |
169 | 169 |
170 package IMPL::Serialization::XmlFormatter; | 170 package IMPL::Serialization::XmlFormatter; |
171 use base qw(IMPL::Object); | 171 use parent qw(IMPL::Object); |
172 | 172 |
173 use IMPL::Class::Property; | 173 use IMPL::Class::Property; |
174 use IMPL::Class::Property::Direct; | 174 use IMPL::Class::Property::Direct; |
175 | 175 |
176 BEGIN { | 176 BEGIN { |