my $self = shift;
(my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
return if $method eq "DESTROY";
+ $self->get_object->$method(@_);
+}
__PACKAGE__->meta->make_immutable;
__PACKAGE__;
package Catalyst::Plugin::Authentication;
-use Moose::Role;
+use Moose;
use MRO::Compat;
use Tie::RefHash;
use Class::Inspector;
# 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 {
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)?$/ ] } );