# Copyright (c) 2001 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: ViewAsPlainText.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ package Bivio::Biz::Action::ViewAsPlainText; use strict; $Bivio::Biz::Action::ViewAsPlainText::VERSION = sprintf('%d.%02d', q$Revision: 2.1 $ =~ /\d+/g); $_ = $Bivio::Biz::Action::ViewAsPlainText::VERSION; =head1 NAME Bivio::Biz::Action::ViewAsPlainText - renders view source as plain text =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::Biz::Action::ViewAsPlainText; =cut =head1 EXTENDS L =cut use Bivio::Biz::Action; @Bivio::Biz::Action::ViewAsPlainText::ISA = ('Bivio::Biz::Action'); =head1 DESCRIPTION C renders a view's source as plain text. =cut #=IMPORTS use Bivio::UI::View; #=VARIABLES =head1 METHODS =cut =for html =head2 static execute(Bivio::Agent::Request req) : boolean Renders a view's source as plain text. I must be the name of the view. L will be appended. Always returns false. =cut sub execute { my($proto, $req) = @_; return $proto->get_instance('LocalFilePlain')->execute( $req, $req->get('uri').Bivio::UI::View->SUFFIX, 'text/plain'); } #=PRIVATE METHODS =head1 COPYRIGHT Copyright (c) 2001 bivio Software, Inc. All rights reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: ViewAsPlainText.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ =cut 1;