Test closures in config in the testapp. Makes everything go bang.
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Model / ClosuresInConfig.pm
diff --git a/t/lib/TestApp/Model/ClosuresInConfig.pm b/t/lib/TestApp/Model/ClosuresInConfig.pm
new file mode 100644 (file)
index 0000000..8f005b4
--- /dev/null
@@ -0,0 +1,12 @@
+package TestApp::Model::ClosuresInConfig;
+use Moose;
+use namespace::clean -except => 'meta';
+
+extends 'TestApp::Model';
+
+# Note - don't call ->config in here until the constructor calls it to
+#        retrieve config, so that we get the 'copy from parent' path, 
+#        and ergo break due to the closure if dclone is used there..
+
+__PACKAGE__->meta->make_immutable;
+