Show
Ignore:
Timestamp:
05/11/09 13:48:10 (4 years ago)
Author:
hidek
Message:

move to Module::Install

Location:
lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk
Files:
8 added
5 removed
5 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk/Changes

    r2462 r33239  
    1 Revision history for Perl module Catalyst::Plugin::FillInForm::ForceUTF8 
     1Revision history for Perl extension Catalyst::Plugin::FillInForm::ForceUTF8 
    22 
    330.02 Wed May  23 2007 
    44    - implemented finalize method 
    55 
    6 0.01 Thu Nov  2 2006 
    7     - original skeleton created with ExtUtils::ModuleMaker::TT 
     60.01    Mon May 11 13:40:02 2009 
     7        - original version 
  • lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk/MANIFEST

    r2462 r33239  
    1 MANIFEST 
     1Changes 
     2inc/Module/Install.pm 
     3inc/Module/Install/AuthorTests.pm 
     4inc/Module/Install/Base.pm 
     5inc/Module/Install/Can.pm 
     6inc/Module/Install/Fetch.pm 
     7inc/Module/Install/Include.pm 
     8inc/Module/Install/Makefile.pm 
     9inc/Module/Install/Metadata.pm 
     10inc/Module/Install/TestBase.pm 
     11inc/Module/Install/Win32.pm 
     12inc/Module/Install/WriteAll.pm 
     13inc/Spiffy.pm 
     14inc/Test/Base.pm 
     15inc/Test/Base/Filter.pm 
     16inc/Test/Builder.pm 
     17inc/Test/Builder/Module.pm 
     18inc/Test/More.pm 
     19lib/Catalyst/Plugin/FillInForm/ForceUTF8.pm 
     20Makefile.PL 
     21MANIFEST                        This list of files 
     22META.yml 
    223README 
    3 LICENSE 
    4 Todo 
    5 Changes 
    6 t/pod.t 
    7 Makefile.PL 
    8 lib/Catalyst/Plugin/FillInForm/ForceUTF8.pm 
    9 t/01_load.t 
     24t/00_compile.t 
     25xt/01_podspell.t 
     26xt/02_perlcritic.t 
     27xt/03_pod.t 
     28xt/perlcriticrc 
  • lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk/Makefile.PL

    r2462 r33239  
    1 use ExtUtils::MakeMaker; 
     1use inc::Module::Install; 
     2name 'Catalyst-Plugin-FillInForm-ForceUTF8'; 
     3all_from 'lib/Catalyst/Plugin/FillInForm/ForceUTF8.pm'; 
    24 
    3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence 
    4 # the contents of the Makefile that is written. 
    5 WriteMakefile( 
    6     NAME => 'Catalyst::Plugin::FillInForm::ForceUTF8', 
    7     VERSION_FROM => 'lib/Catalyst/Plugin/FillInForm/ForceUTF8.pm',    # finds $VERSION 
    8     AUTHOR    => 'Hideo Kimura (hide@hide-k.net)', 
    9     ABSTRACT  => 'Module abstract (<= 44 characters) goes here', 
    10     PREREQ_PM => { 
    11         'Test::Simple'                => 0.44, 
    12         'Catalyst'                    => 0, 
    13         'HTML::FillInForm::ForceUTF8' => 0 
    14     }, 
    15 ); 
     5requires 'Catalyst' => '5.7012'; 
     6requires 'HTML::FillInForm::ForceUTF8'; 
     7 
     8tests 't/*.t'; 
     9author_tests 'xt'; 
     10 
     11build_requires 'Test::More'; 
     12use_test_base; 
     13auto_include; 
     14WriteAll; 
  • lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk/README

    r2462 r33239  
    1 perl Makefile.PL 
    2 make 
    3 make test 
    4 make install 
     1This is Perl module Catalyst::Plugin::FillInForm::ForceUTF8. 
     2 
     3INSTALLATION 
     4 
     5Catalyst::Plugin::FillInForm::ForceUTF8 installation is straightforward. If your CPAN shell is set up, 
     6you should just be able to do 
     7 
     8    % cpan Catalyst::Plugin::FillInForm::ForceUTF8 
     9 
     10Download it, unpack it, then build it as per the usual: 
     11 
     12    % perl Makefile.PL 
     13    % make && make test 
     14 
     15Then install it: 
     16 
     17    % make install 
     18 
     19DOCUMENTATION 
     20 
     21Catalyst::Plugin::FillInForm::ForceUTF8 documentation is available as in POD. So you can do: 
     22 
     23    % perldoc Catalyst::Plugin::FillInForm::ForceUTF8 
     24 
     25to read the documentation online with your favorite pager. 
     26 
     27Hideo Kimura 
  • lang/perl/Catalyst-Plugin-FillInForm-ForceUTF8/trunk/lib/Catalyst/Plugin/FillInForm/ForceUTF8.pm

    r2462 r33239  
    22 
    33use strict; 
    4 use NEXT; 
    54use HTML::FillInForm::ForceUTF8; 
     5use MRO::Compat; 
    66 
    77our $VERSION = '0.02'; 
     
    7878            || $c->stash->{error}; 
    7979    } 
    80     return $c->NEXT::finalize(@_); 
     80    return $c->method::next(@_); 
    8181} 
    8282 
     
    9898    $c->fillform( \%data_hash ); 
    9999 
    100 C<fillform> must be called after an HTML template has been 
    101 rendered. A typical way of using it is to place it immediately 
    102 after your C<forward> call to your view class, which might be 
    103 in a built-in C<end> action in your application class. 
     100You can also hand in a hashref of additional params for 
     101HTML::FillInForm->fill() if you like.  Explicitly providing a 
     102\%data_hash is mandatory for this use case. 
    104103 
    105    sub render : ActionClass('RenderView') {} 
    106  
    107    sub end : Private { 
    108        my ( $self, $c ) = @_; 
    109        $c->forward('render'); 
    110        $c->fillform; 
    111    } 
     104    $c->fillform( $c->req->parameters, { 
     105        ignore_fields => [ 'pagesrc', 'pagedst' ], 
     106        fill_password => 0, 
     107    } ); 
    112108 
    113109=cut 
     
    116112    my $c = shift; 
    117113    my $fdat = shift || $c->request->parameters; 
     114    my $additional_params = shift; 
    118115 
    119116    $c->response->output( 
    120117        HTML::FillInForm::ForceUTF8->new->fill( 
    121118            scalarref => \$c->response->{body}, 
    122             fdat      => $fdat 
     119            fdat      => $fdat, 
     120            %$additional_params, 
    123121        ) 
    124122    ); 
     
    137135        } 
    138136    ); 
     137 
     138=head1 NOTES 
     139 
     140This class does not play well with Catalyst's ActionClass('RenderView') 
     141so you may want to check your C<end> method (in Controller/Root.pm or perhaps 
     142MyApp.pm). If it looks like this: 
     143 
     144     sub end : ActionClass('RenderView') {} 
     145 
     146Then you'll need to change it to something like this: 
     147 
     148     sub end : Private { 
     149        my ($self, $c) = @_; 
     150        $c->forward('render'); 
     151        $c->fillform($c->req->params) unless $c->res->output; 
     152     } 
     153 
     154     sub render : ActionClass('RenderView') { } 
    139155 
    140156=head1 SEE ALSO