Whole lotta reorganisation. Moved the app demo down into t/lib, added Module::Install...
t0m [Thu, 30 Apr 2009 22:28:43 +0000 (23:28 +0100)]
Makefile.PL
dynamicappdemo.yml [deleted file]
lib/CatalystX/DynamicComponent.pm
t/00load_and_sane.t
t/01app.t
t/04_dynamicmodel.t
t/lib/DynamicAppDemo.pm [moved from lib/DynamicAppDemo.pm with 74% similarity]
t/lib/DynamicAppDemo/Controller/FakeExample.pm [moved from lib/DynamicAppDemo/Controller/FakeExample.pm with 100% similarity]
t/lib/DynamicAppDemo/Controller/Root.pm [moved from lib/DynamicAppDemo/Controller/Root.pm with 100% similarity]

index 2380afb..15b0c80 100644 (file)
@@ -1,21 +1,14 @@
-# IMPORTANT: if you delete this file your app will not work as
-# expected.  you have been warned
 use inc::Module::Install;
 
-name 'DynamicAppDemo';
-all_from 'lib/DynamicAppDemo.pm';
+name 'CatalystX-DynamicComponent';
+all_from 'lib/CatalystX/DynamicComponent.pm';
 
 requires 'MooseX::Types::Structured' => '0.12';
 requires 'namespace::autoclean';
 requires 'MooseX::Types' => '0.10';
 requires 'MooseX::Role::Parameterized' => '0.05';
 requires 'Catalyst::Model::Adaptor';
-requires 'Catalyst::Runtime' => '5.80001';
-requires 'Catalyst::Plugin::ConfigLoader';
-requires 'YAML';
+requires 'Catalyst::Runtime' => '5.80003';
 
-catalyst;
-
-install_script glob('script/*.pl');
-auto_install;
+extra_texts; # Need to install Module::Install::ExtraTests 
 WriteAll;
diff --git a/dynamicappdemo.yml b/dynamicappdemo.yml
deleted file mode 100644 (file)
index 5dbc1db..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
----
-name: DynamicAppDemo
-Model::One:
-    class: SomeModelClass
index 2e279d9..e773b62 100644 (file)
@@ -2,6 +2,8 @@ package CatalystX::DynamicComponent;
 use MooseX::Role::Parameterized;
 use namespace::autoclean;
 
+our $VERSION = 0.000001;
+
 parameter 'name' => (
     isa => 'Str',
     required => 1,
index f04d3a4..70da626 100644 (file)
@@ -4,11 +4,11 @@ use warnings;
 # FIXME - Not sure if this does what I think it does, test..
 
 use FindBin qw/$Bin/;
-use lib "$Bin/../lib";
+use lib "$Bin/lib";
 
 use List::MoreUtils qw/any/;
 use Module::Find;
-setmoduledirs("$Bin/../lib");
+setmoduledirs("$Bin/../lib", "$Bin/lib");
 
 use Test::More tests => 4;
 use Test::Exception;
index 9fbc5ed..21e1224 100644 (file)
--- a/t/01app.t
+++ b/t/01app.t
@@ -1,5 +1,9 @@
 use strict;
 use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
 use Test::More tests => 6;
 
 BEGIN { use_ok 'Catalyst::Test', 'DynamicAppDemo' }
index 9386187..3824a96 100644 (file)
@@ -2,6 +2,9 @@ use strict;
 use warnings;
 use Test::More tests => 3;
 
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
 use DynamicAppDemo;
 
 # Naughty, should make an app instance.
similarity index 74%
rename from lib/DynamicAppDemo.pm
rename to t/lib/DynamicAppDemo.pm
index 1c881f4..856ff73 100644 (file)
@@ -4,7 +4,6 @@ use Catalyst::Runtime '5.80002';
 
 use Catalyst qw/
     -Debug
-    ConfigLoader
 /;
 
 extends 'Catalyst';
@@ -18,7 +17,12 @@ with qw/
 
 our $VERSION = '0.01';
 
-__PACKAGE__->config( name => 'DynamicAppDemo' );
+__PACKAGE__->config( 
+    name => 'DynamicAppDemo',
+    'Model::One' => {
+        class => 'SomeModelClass',
+    },
+);
 
 __PACKAGE__->setup();