Created
June 28, 2009 14:36
-
-
Save taiyoh/137282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Ark/View/MT.pm b/lib/Ark/View/MT.pm | |
index 7ba34a0..c809199 100644 | |
--- a/lib/Ark/View/MT.pm | |
+++ b/lib/Ark/View/MT.pm | |
@@ -75,7 +75,7 @@ sub render { | |
or return; | |
my $renderer = $self->build_template($template . $self->extension); | |
- $renderer->($self->context, @_)->as_string; | |
+ $renderer->($self, $self->context, @_)->as_string; | |
} | |
sub build_template { | |
@@ -127,6 +127,7 @@ sub build { | |
my $__expr = <<"..."; | |
package $__mt->{package_name}; | |
sub { | |
+ my \$self = shift; | |
my \$c = shift; | |
my \$s = my \$stash = \$c->stash; | |
my \$v = my \$view = \$self; | |
diff --git a/lib/Ark/View/MTFile.pm b/lib/Ark/View/MTFile.pm | |
index a1208bb..eb31c5d 100644 | |
--- a/lib/Ark/View/MTFile.pm | |
+++ b/lib/Ark/View/MTFile.pm | |
@@ -49,7 +49,7 @@ sub render { | |
or return; | |
my $renderer = $self->build_template_with_wrapper($template . $self->extension); | |
- $renderer->($self->context, @_)->as_string; | |
+ $renderer->($self, $self->context, @_)->as_string; | |
} | |
=item include | |
@@ -71,7 +71,7 @@ sub include { | |
or return; | |
my $renderer = $self->build_template($template . $self->extension); | |
- $renderer->($self->context, @_)->as_string; | |
+ $renderer->($self, $self->context, @_)->as_string; | |
} | |
sub build_template_with_wrapper { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment