From 7b6ac4f2224a5efa5f49fb85a12845bbf3cc0916 Mon Sep 17 00:00:00 2001 From: Daniel Tiefnig Date: Wed, 14 Oct 2009 09:28:57 +0000 Subject: [PATCH] copied and adapted Plain View from www_csc --- lib/admin/View/Plain.pm | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 lib/admin/View/Plain.pm diff --git a/lib/admin/View/Plain.pm b/lib/admin/View/Plain.pm new file mode 100644 index 0000000..96bd4c7 --- /dev/null +++ b/lib/admin/View/Plain.pm @@ -0,0 +1,54 @@ +package admin::View::Plain; + +use strict; + +=head1 NAME + +admin::View::Plain - TT View for plain text + +=head1 DESCRIPTION + +Plain View for admin. It will output plain data with the corresponding +content-type header set. + +=cut + +sub new { + return bless {}, shift; +} + +sub process { + my ( $self, $c ) = @_; + + $c->response->content_type($c->stash->{content_type}); + $c->response->body($c->stash->{content}); + + return 1; +} + +=head1 BUGS AND LIMITATIONS + +=over + +=item none I know. + +=back + +=head1 SEE ALSO + +Catalyst, admin + +=head1 AUTHORS + +Daniel Tiefnig +Andreas Granig + +=head1 COPYRIGHT + +The Plain view is Copyright (c) 2009 Sipwise GmbH, Austria. All rights +reserved. + +=cut + +# over and out +1;