Turn the captured $app into a weak reference.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Component / Role / CaptureApp.pm
index 205370e..54da050 100644 (file)
@@ -5,7 +5,7 @@ use namespace::clean -except => 'meta';
 
 # Future - isa => 'ClassName|Catalyst' performance?
 #           required => 1 breaks tests..
-has _application => (is => 'ro');
+has _application => (is => 'ro', weak_ref => 1);
 sub _app { (shift)->_application(@_) }
 
 override BUILDARGS => sub {