Controller.pm
Index: lib/Catalyst/Controller.pm
===================================================================
--- lib/Catalyst/Controller.pm (revision 8773)
+++ lib/Catalyst/Controller.pm (working copy)
@@ -121,14 +121,13 @@
return !@{ $c->error };
}
-around new => sub {
- my $orig = shift;
- my $self = shift;
- my $app = $_[0];
- my $new = $self->$orig(@_);
- $new->_application( $app );
- return $new;
-};
+sub BUILDARGS {
+ my $class = shift;
+ my $app = shift;
+ my $args = shift;
+ $args->{'_application'} = $app;
+ return $args;
+}
sub action_for {
my ( $self, $name ) = @_;