view Lib/IMPL/DOM/Schema/InflateFactory.pm @ 192:a9faf883cdce

IMPL::Web::View refactoring
author cin
date Fri, 06 Apr 2012 16:22:38 +0400
parents d1676be8afcc
children 4d0e1962161c
line wrap: on
line source

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;