aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/RenderingContext
diff options
context:
space:
mode:
authormatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-01-30 16:33:10 +0000
committermatthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-01-30 16:33:10 +0000
commit8a293e2eee23938229a7dbfb617faee579914dfc (patch)
treef1626e9facac38a6b323c92e7d31585e5902cbba /lib/Reaction/UI/RenderingContext
parent46937531eb2d28950b21c8b0982539e28b277b60 (diff)
downloadreaction-8a293e2eee23938229a7dbfb617faee579914dfc.tar.gz
reaction-8a293e2eee23938229a7dbfb617faee579914dfc.zip
first cut of Reaction::UI::Skin and SiteLayout VP+widget
Diffstat (limited to 'lib/Reaction/UI/RenderingContext')
-rw-r--r--lib/Reaction/UI/RenderingContext/TT.pm45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/Reaction/UI/RenderingContext/TT.pm b/lib/Reaction/UI/RenderingContext/TT.pm
index 8308c0c..b359747 100644
--- a/lib/Reaction/UI/RenderingContext/TT.pm
+++ b/lib/Reaction/UI/RenderingContext/TT.pm
@@ -6,11 +6,6 @@ use aliased 'Template::View';
class TT is RenderingContext, which {
- has 'iter_class' => (
- is => 'ro', required => 1,
- default => sub { 'Reaction::UI::Renderer::TT::Iter'; },
- );
-
our $body;
implements 'dispatch' => as {
@@ -67,45 +62,5 @@ class TT is RenderingContext, which {
};
};
-
-package Reaction::UI::Renderer::TT::Iter;
-
-use overload (
- q{""} => 'stringify',
- fallback => 1
-);
-
-sub pos { shift->{pos} }
-
-sub new {
- my ($class, $cr, $rctx) = @_;
- bless({ rctx => $rctx, cr => $cr, pos => 0 }, $class);
-}
-
-sub next {
- my $self = shift;
- $self->{pos}++;
- my $next = $self->{cr}->();
- return unless $next;
- return sub { $next->($self->{rctx}) };
-}
-
-sub all {
- my $self = shift;
- my @all;
- while (my $e = $self->next) {
- push(@all, $e);
- }
- \@all;
-}
-
-sub stringify {
- my $self = shift;
- my $res = '';
- foreach my $e (@{$self->all}) {
- $res .= $e->();
- }
- $res;
-}
1;