Catalyst::View::Reproxy - Reproxing View for lighty and perlbal.


Catalyst-View-Reproxy documentation  | view source Contained in the Catalyst-View-Reproxy distribution.

Index


NAME

Top

Catalyst::View::Reproxy - Reproxing View for lighty and perlbal.

VERSION

Top

Version 0.05

SYNOPSIS

Top

In your view class

	package MyApp::View::MyReproxy;

  use base qw/Catalyst::View::Reproxy/;

  __PACKAGE__->config(
    perlbal => 1
  );

In your controller class

  sub index: Private {
    my ($self, $c) = @_;

    $c->forward('View::MyReproxy', {});
  }

METHODS

Top

new($c, $arguments)

Constructor

config, arguments

lighttpd

If the frontend web server is lighttpd, the value would be 1. (default 0)

perlbal

If the frontend web server is perlbal, the value would be 1. (default 0)

mime_magic

Using mime magic. (depend on File::MMagic)

mime_magic_file

Using external magic file (see File::MMagic)

timeout

Emulating "X-REPROXY-URL" without using perlbal, LWP::UserAgent's timeout setting. (see LWP::UserAgent)

process($c, $arguments)

Override Catalyst::View process method.

Using 'X-REPROXY-FILE' or 'X-Sendfile' header,

  sub index: Private {
    my ($self, $c) = @_;

    $c->forward('View::MyReproxy', [reproxy_file => '/path/to/file'])
  }

Using 'X-REPROXY-URL',

  sub index: Private {
    my ($self, $c) = @_;

		$c->view('MyReproxy')->process($c, 
			'reproxy_file' => $c->path_to('DUMMY')
		);
  }

The url or path can be substituted to $c->stash instead of arguments,

  sub index: Private {
    my ($self, $c) = @_;

    $c->stash->{reproxy_file} = '/path/to/file';
    $c->forward('View::MyReproxy');
  }

process_file($c, $file, $arguments)

processing file.

process_url($c, $url, $arguments)

processing urls.

header_name($header)

Translating http header name.

process_extra_headers($c, $arguments)

Setting extra http response headers.

AUTHOR

Top

Toru Yamaguchi, <zigorou at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-catalyst-view-reproxy at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-View-Reproxy. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Catalyst::View::Reproxy

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Catalyst-View-Reproxy

* CPAN Ratings

http://cpanratings.perl.org/d/Catalyst-View-Reproxy

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-View-Reproxy

* Search CPAN

http://search.cpan.org/dist/Catalyst-View-Reproxy

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Catalyst-View-Reproxy documentation  | view source Contained in the Catalyst-View-Reproxy distribution.