The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::View::MobileJpFilter - Filtering HTML for Japanese cellphone

DESCRIPTION

Catalyst::View::MobileJpFilter is a simple adapter to use HTML::MobileJp::Filter as Catalyst view class.

SYNOPSIS

  package MyApp::View::MobileJpFilter;
  use strict;
  use base 'Catalyst::View::MobileJpFilter';
  
  use YAML;
  
  __PACKAGE__->config(YAML::Load <<'...'
  ---
  filters:
    - module: DoCoMoCSS
      config:
        base_dir: __path_to(root)__
    - module: DoCoMoGUID
    - module: FallbackImage
      config:
        template: '<img src="%s.gif" />'
        params:
          - unicode_hex
  ...
  );
  
  1;

CONFIGURATION

Same as HTML::MobileJp::Filter.

One trick: You can use Catalyst::Plugin::ConfigLoader's __path_to(some/dir)__ syntax in view class. maybe you need this.

HOW TO USE

Use as follows from your controller.

  sub end :Private {
      my ($self, $c) = @_;
      $c->forward( $c->view('TT') );             # making $c->res->body
      $c->forward( $c->view('MobileJpFilter') ); # filtering $c->res->body
  }

Or with RenderView.

  sub render :ActionClass('RenderView') { }
  
  sub end :Private {
      my ($self, $c) = @_;
      $c->forward('render');
      $c->forward( $c->view('MobileJpFilter') );
  }

AUTHOR

Naoki Tomita <tomita@cpan.org>

LICENSE

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

SEE ALSO

HTML::MobileJp::Filter

http://coderepos.org/share/browser/lang/perl/Catalyst-View-MobileJpFilter (repository)