Toru Yamaguchi > Catalyst-View-Reproxy > Catalyst::View::Reproxy

Download:
Catalyst-View-Reproxy-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.05   Source  

NAME ^

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

VERSION ^

Version 0.05

SYNOPSIS ^

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 ^

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 ^

Toru Yamaguchi, <zigorou at cpan.org>

BUGS ^

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 ^

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

    perldoc Catalyst::View::Reproxy

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2006 Toru Yamaguchi, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: