Mercurial > pub > Impl
diff Lib/IMPL/DOM/Schema/InflateFactory.pm @ 104:196bf443b5e1
DOM::Schema RC0 inflators support, validation and some other things,
Minor and major fixes almost for everything.
A 'Source' property of the ValidationErrors generated from a NodeSet or a NodeList is subject to change in the future.
author | wizard |
---|---|
date | Tue, 11 May 2010 02:42:59 +0400 |
parents | |
children | d1676be8afcc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/DOM/Schema/InflateFactory.pm Tue May 11 02:42:59 2010 +0400 @@ -0,0 +1,17 @@ +package IMPL::DOM::Schema::InflateFactory; +use strict; + +require IMPL::Exception; +require IMPL::Object::Factory; + +sub new { + my ($self,$value) = @_; + + if ($value =~ /^(\w+(?:::\w+)*)(?:\.(\w+))?$/) { + return IMPL::Object::Factory->new($1,undef,$2); + } else { + die new IMPL::InvalidArgumentException("Expected value in the format PACKAGE::NAME.method_name",$value); + } +} + +1; \ No newline at end of file