From: Tomas Doran Date: Thu, 9 Sep 2010 23:10:15 +0000 (+0000) Subject: Fix all the tests after merge X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b607a0ef65eca0700662cbb8524715564c85b6d;p=catagits%2FCatalyst-Plugin-Authentication.git Fix all the tests after merge --- diff --git a/lib/Catalyst/Authentication/User.pm b/lib/Catalyst/Authentication/User.pm index eeff10e..a97d3d3 100644 --- a/lib/Catalyst/Authentication/User.pm +++ b/lib/Catalyst/Authentication/User.pm @@ -72,6 +72,8 @@ sub AUTOLOAD { my $self = shift; (my $method) = (our $AUTOLOAD =~ /([^:]+)$/); return if $method eq "DESTROY"; + $self->get_object->$method(@_); +} __PACKAGE__->meta->make_immutable; __PACKAGE__; diff --git a/lib/Catalyst/Plugin/Authentication.pm b/lib/Catalyst/Plugin/Authentication.pm index d78a63b..98f170f 100644 --- a/lib/Catalyst/Plugin/Authentication.pm +++ b/lib/Catalyst/Plugin/Authentication.pm @@ -1,5 +1,5 @@ package Catalyst::Plugin::Authentication; -use Moose::Role; +use Moose; use MRO::Compat; use Tie::RefHash; use Class::Inspector; @@ -192,12 +192,13 @@ sub auth_restore_user { # We can't actually do our setup in setup because the model has not yet been loaded. # So we have to trigger before 'setup_finalize'. -before 'setup_finalize' => sub { +sub setup { my $app = shift; $app->mk_classdata('_auth_initialized'); $app->_authentication_initialize(); -}; + $app->next::method(@_); +} ## the actual initialization routine. whee. sub _authentication_initialize { diff --git a/t/author/pod_coverage.t b/t/author/pod_coverage.t index d91be5e..a36aa99 100644 --- a/t/author/pod_coverage.t +++ b/t/author/pod_coverage.t @@ -4,4 +4,4 @@ eval "use Test::Pod::Coverage 1.04"; plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@; plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; -all_pod_coverage_ok(); +all_pod_coverage_ok( { also_private => [ qr/^BUILD(ARGS)?$/ ] } );