view Lib/IMPL/Code/MethodCache.pm @ 148:e6447ad85cb4

DOM objects now have a schema and schemaSource properties RegExp now can launder data Improved post to DOM transformation (multiple values a now supported) Added new axes to navigation queries: ancestor and descendant minor changes and bug fixes
author wizard
date Mon, 16 Aug 2010 08:26:44 +0400
parents c2aa10fbb396
children
line wrap: on
line source

package IMPL::Code::MethodCache;
use strict;
use IMPL qw(Debug);

my %cachedMethods;

sub dbgBuildCachedMethod {
	my ($class,$method,$prefix,$mappers)= @_;
	
	no strict 'refs';
	
	$prefix ||= 'call';
	
	my $proxyMethod = "$prefix$method";
	
	die new IMPL::Exception("A proxy method already exists") if *{"${class}::$proxyMethod"}{CODE};
	
	my @methodCache = cacheMethod($class,$method,$mappers);
	
	*{"${class}::$proxyMethod"} = sub {
		$_->(@_) foreach @methodCache;
	}
}

sub cacheMethod {
	my ($class,$method,$mappers) = @_;
}

1;