diff --git a/dist.ini b/dist.ini index beab1c6..d823758 100644 --- a/dist.ini +++ b/dist.ini @@ -31,6 +31,21 @@ Test::More = 0.92 ; done_testing ;; -- Sets of additional tests we want to do as part of release [Test::Perl::Critic] [MetaTests] +[Test::Compile] +[Test::EOF] +[Test::NoTabs] +finder = :InstallModules +[Test::Portability] +[Test::PodSpelling] +stopword = TT +stopword = renderer +stopword = MultiForms +stopword = CSRF +stopword = formfu +stopword = Moritz ; we need these because there is ... +stopword = Onken ; no contributor list yet +[Test::NoBreakpoints] +[Test::UnusedVars] ;; [PodCoverageTests] ; Currently we comprehensively fail these [OurPkgVersion] [PodVersion] @@ -65,4 +80,4 @@ allow_dirty = README.pod allow_dirty = Changes commit_msg = v%v%t - %d%n%n%c tag_format = v%v%t ; see Git::Tag -tag_message = v%v%t - %d ; see Git::Tag \ No newline at end of file +tag_message = v%v%t - %d ; see Git::Tag diff --git a/lib/Catalyst/Controller/HTML/FormFu.pm b/lib/Catalyst/Controller/HTML/FormFu.pm index 3f9441f..aa36772 100644 --- a/lib/Catalyst/Controller/HTML/FormFu.pm +++ b/lib/Catalyst/Controller/HTML/FormFu.pm @@ -615,10 +615,10 @@ equivalent to C<< $c->uri_for( 'URI', \@ARGS ) >>. At this time, there is no way to pass query values equivalent to C<< $c->uri_for( 'URI', \@ARGS, \%QUERY_VALUES ) >>. -The second codeword that is being replaced is C<__path_to( @DIRS )__>. Any +The second code word that is being replaced is C<__path_to( @DIRS )__>. Any instance is replaced with the result of passing the C arguments to L. -Don't use qoutationmarks as they would become part of the path. +Don't use quotation marks as they would become part of the path. Default value: 1 @@ -633,7 +633,7 @@ Default value: C. If set to a true value the action for the form will be set to the currently called action path. -The action path includes concurrent to action name additioal parameters which +The action path includes concurrent to action name additional parameters which were code inside the path. Default value: C. @@ -682,7 +682,7 @@ Default value: C If you're using a L10N / I18N plugin such as L which provides a C method that returns a list of valid languages to use -for the currect request - and you want to use formfu's built-in I18N packages, +for the correct request - and you want to use formfu's built-in I18N packages, then setting L =head2 localize_from_context @@ -735,7 +735,7 @@ rendering the form. =head1 GITHUB REPOSITORY -This module's sourcecode is maintained in a git repository at +This module's source code is maintained in a git repository at L The project page is L diff --git a/lib/Catalyst/Helper/HTML/FormFu.pm b/lib/Catalyst/Helper/HTML/FormFu.pm index 336cb7f..0a80e0c 100644 --- a/lib/Catalyst/Helper/HTML/FormFu.pm +++ b/lib/Catalyst/Helper/HTML/FormFu.pm @@ -45,10 +45,10 @@ Catalyst::Helper::HTML::FormFu - Helper to deploy HTML::FormFu template files. As of version 0.02000, L doesn't use the TT template files by default - it uses in internal rendering engine. -If you don't want to customise the generated markup, you don't need to use +If you don't want to customize the generated markup, you don't need to use L at all. -If you want to customise the generated markup, you'll need a +If you want to customize the generated markup, you'll need a local copy of the template files. To create the files in the default C directory, run: diff --git a/lib/HTML/FormFu/Constraint/RequestToken.pm b/lib/HTML/FormFu/Constraint/RequestToken.pm index fc082bb..27df06c 100644 --- a/lib/HTML/FormFu/Constraint/RequestToken.pm +++ b/lib/HTML/FormFu/Constraint/RequestToken.pm @@ -9,7 +9,7 @@ use Moose; extends 'HTML::FormFu::Constraint'; sub BUILD { - my ( $self, $args ) = @_; + my ( $self ) = @_; $self->message($self->parent->message); diff --git a/lib/HTML/FormFu/Element/RequestToken.pm b/lib/HTML/FormFu/Element/RequestToken.pm index aefa6ef..f5be4ea 100644 --- a/lib/HTML/FormFu/Element/RequestToken.pm +++ b/lib/HTML/FormFu/Element/RequestToken.pm @@ -42,8 +42,6 @@ sub verify_token { croak "verify_token() can only be called if form has been submitted" if !$form->submitted; - my $field_name = $self->name; - my $c = $self->form->stash->{ $self->context }; for ( @{ $c->session->{ $self->session_key } || [] } ) { diff --git a/lib/HTML/FormFu/Plugin/RequestToken.pm b/lib/HTML/FormFu/Plugin/RequestToken.pm index 25937a9..a86c81e 100644 --- a/lib/HTML/FormFu/Plugin/RequestToken.pm +++ b/lib/HTML/FormFu/Plugin/RequestToken.pm @@ -18,8 +18,6 @@ sub process { return if $self->form->get_all_element( { name => $self->field_name } ); - my $c = $self->form->stash->{'context'}; - $self->form->elements( [ { type => 'RequestToken', name => $self->field_name, diff --git a/t/01basic-token.t b/t/01basic-token.t index 30835ca..d30b6da 100644 --- a/t/01basic-token.t +++ b/t/01basic-token.t @@ -73,4 +73,4 @@ ok( $res = $mech->submit_form( fields => { 'basic_form' => 1, '_token' => $token is( $mech->content, 'VALID', 'form is valid' ); -done_testing; \ No newline at end of file +done_testing; diff --git a/t/03instancepercontext.t b/t/03instancepercontext.t index a557dcc..f7ae7ae 100644 --- a/t/03instancepercontext.t +++ b/t/03instancepercontext.t @@ -12,4 +12,4 @@ eval { ok(!$@, 'lives ok'); -done_testing; \ No newline at end of file +done_testing; diff --git a/t/elements/requesttoken.t b/t/elements/requesttoken.t index b921b6c..1026650 100644 --- a/t/elements/requesttoken.t +++ b/t/elements/requesttoken.t @@ -28,4 +28,4 @@ sub new { return bless({}, shift) } sub session { return {} } -} \ No newline at end of file +}