diff Lib/IMPL/Web/View/TTContext.pm @ 343:9bdccdf1f50b

Added a templates context
author cin
date Fri, 13 Sep 2013 12:53:15 +0400
parents
children 72799d1211c5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Web/View/TTContext.pm	Fri Sep 13 12:53:15 2013 +0400
@@ -0,0 +1,27 @@
+package IMPL::Web::View::TTContext;
+use strict;
+use Template::Base;
+
+use IMPL::declare {
+	base => {
+		'Template::Context' => '@_'
+	}
+};
+
+sub clone {
+	my $this = shift;
+	
+	$this->localise();	
+
+	my $args = { %{$this} };
+
+	$this->delocalise();
+	
+	my $class = typeof($this);
+	
+    delete $args->{CONFIG};
+    
+    return $class->new($args);
+}
+
+1;
\ No newline at end of file