papix/Nephia-Plugin-CSRFDefender — pull request #1 by syohex (2013-07-22 02:20:20+00:00)
Title: fix minimal Nephia version

This module requires Nephia 0.32 or higher, but I failed test with Nephia 0.36.

```
[0.36]
% ./Build test
t/00_compile.t ............... ok
t/01_csrf_defender.t ......... # PSGI error: Undefined subroutine &Nephia::Plugin::CSRFDefender::plugin_config called at /home/syohei/.cpanm/work/1374459222.26370/Nephia-Plugin-CSRFDefender-0.01/blib/lib/Nephia/Plugin/CSRFDefender.pm line 62.

# Failed test 'GET http://localhost/form'
# at t/01_csrf_defender.t line 59.
# 500
# undef

# Failed test 'Content is like "(?^:)"'
# at t/01_csrf_defender.t line 60.
# got: "Undefined subroutine &Nephia::Plugin::CSRFDefender"...
# length: 198
# doesn't match '(?^:)'
There is no form numbered 1 at /home/syohei/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/WWW/Mechanize.pm line 1900.
# Child (success case) exited without calling finalize()
t/01_csrf_defender.t ......... 1/?
# Failed test 'success case'
# at /home/syohei/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1/Test/Builder.pm line 252.
# Tests were run but no plan was declared and done_testing() was not seen.
t/01_csrf_defender.t ......... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests
t/02_csrf_defender_manual.t .. # PSGI error: Undefined subroutine &Nephia::Plugin::CSRFDefender::plugin_config called at /home/syohei/.cpanm/work/1374459222.26370/Nephia-Plugin-CSRFDefender-0.01/blib/lib/Nephia/Plugin/CSRFDefender.pm line 62.

# Failed test 'GET http://localhost/form'
# at t/02_csrf_defender_manual.t line 70.
# 500
# undef

# Failed test 'Content is like "(?^:)"'
# at t/02_csrf_defender_manual.t line 71.
# got: "Undefined subroutine &Nephia::Plugin::CSRFDefender"...
# length: 198
# doesn't match '(?^:)'
There is no form numbered 1 at /home/syohei/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/WWW/Mechanize.pm line 1900.
# Child (success case) exited without calling finalize()
t/02_csrf_defender_manual.t .. 1/?
# Failed test 'success case'
# at /home/syohei/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1/Test/Builder.pm line 252.
# Tests were run but no plan was declared and done_testing() was not seen.
t/02_csrf_defender_manual.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests

Test Summary Report
-------------------
t/01_csrf_defender.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/02_csrf_defender_manual.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=3, Tests=3, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.79 cusr 0.10 csys = 0.94 CPU)
Result: FAIL
Failed 2/3 test programs. 2/3 subtests failed.
```

```
[0.37]
% ./Build test
t/00_compile.t ............... ok
t/01_csrf_defender.t ......... ok
t/02_csrf_defender_manual.t .. ok
All tests successful.
Files=3, Tests=8, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.80 cusr 0.07 csys = 0.93 CPU)
Result: PASS
```