[Bast-commits] r3180 - in trunk/Anything/lib: . Anything/Controller Anything/Model/Anything

castaway at dev.catalyst.perl.org castaway at dev.catalyst.perl.org
Sun Apr 8 02:06:31 GMT 2007


Author: castaway
Date: 2007-04-08 02:06:29 +0100 (Sun, 08 Apr 2007)
New Revision: 3180

Modified:
   trunk/Anything/lib/Anything.pm
   trunk/Anything/lib/Anything/Controller/Item.pm
   trunk/Anything/lib/Anything/Model/Anything/Admin.pm
   trunk/Anything/lib/Anything/Model/Anything/Import.pm
   trunk/Anything/lib/Anything/Model/Anything/ImportResultType.pm
   trunk/Anything/lib/Anything/Model/Anything/ImportResults.pm
   trunk/Anything/lib/Anything/Model/Anything/ItemValues.pm
   trunk/Anything/lib/Anything/Model/Anything/Items.pm
   trunk/Anything/lib/Anything/Model/Anything/MajorMinor.pm
   trunk/Anything/lib/Anything/Model/Anything/Relationships.pm
   trunk/Anything/lib/Anything/Model/Anything/Type.pm
   trunk/Anything/lib/Anything/Model/Anything/TypeAttributes.pm
   trunk/Anything/lib/Anything/Model/Anything/TypeFields.pm
Log:
Fixups for Catalyst 5.7007


Modified: trunk/Anything/lib/Anything/Controller/Item.pm
===================================================================
--- trunk/Anything/lib/Anything/Controller/Item.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Controller/Item.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -127,7 +127,8 @@
         my $type = $c->model('Anything::Type')->find($args[0]);
 #        $c->log->info('Ref Type');
 #        $c->log->info(ref($type));
-        my $itemrs = $c->comp('DB::Anything')->sub_items($type, { 
+        my $itemrs = $c->model('Anything')->sub_items($type, { 
+#        my $itemrs = $c->comp('DB::Anything')->sub_items($type, { 
             page => $page,
             rows => $rows });
         $c->log->info("Page: $page, Rows: $rows");
@@ -143,7 +144,8 @@
     else
     {
         my $type = $c->model('Anything::Type')->find({Name => 'Item'});
-        my $itemrs = $c->comp('DB::Anything')->sub_items($type, { 
+        my $itemrs = $c->model('Anything')->sub_items($type, { 
+#        my $itemrs = $c->comp('DB::Anything')->sub_items($type, { 
             page => $page,
             rows => $rows });
 
@@ -314,7 +316,8 @@
     $c->stash->{template} = 'edit.tt';
 #    $self->SUPER::edit(@_);
 
-    my $model = $c->comp('Anything::Items');
+    my $model = $c->model('Anything::Items');
+#    my $model = $c->comp('Anything::Items');
     $c->log->info("Edit Model: $model");
     my $item = $model->find($id)
       or die "Attempting to edit nonexistant item number $id";

Modified: trunk/Anything/lib/Anything/Model/Anything/Admin.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/Admin.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/Admin.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,8 @@
 sub ACCEPT_CONTEXT 
 { 
     my ($self, $c) = @_;
-    return $c->model('DB::Anything')->resultset('Admin'); 
+    return $c->model('Anything')->resultset('Admin'); 
+#    return $c->model('DB::Anything')->resultset('Admin'); 
 #    return $c->model('DBIC')->resultset('Relationships'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/Import.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/Import.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/Import.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,8 @@
 { 
     my ($self, $c) = @_;
     $c->log->info("A::M::A::Import .. accepting context\n");
-    return $c->comp('DB::Anything')->resultset('Import'); 
+    return $c->model('Anything')->resultset('Import'); 
+#    return $c->comp('DB::Anything')->resultset('Import'); 
 #    return $c->model('DBIC')->resultset('Type'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/ImportResultType.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/ImportResultType.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/ImportResultType.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,8 @@
 { 
     my ($self, $c) = @_;
     $c->log->info("A::M::A::ImportResultType .. accepting context\n");
-    return $c->comp('DB::Anything')->resultset('ImportResultType'); 
+    return $c->model('Anything')->resultset('ImportResultType'); 
+#    return $c->comp('DB::Anything')->resultset('ImportResultType'); 
 #    return $c->model('DBIC')->resultset('Type'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/ImportResults.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/ImportResults.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/ImportResults.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,8 @@
 { 
     my ($self, $c) = @_;
     $c->log->info("A::M::A::ImportResults .. accepting context\n");
-    return $c->comp('DB::Anything')->resultset('ImportResults'); 
+    return $c->model('Anything')->resultset('ImportResults'); 
+#    return $c->comp('DB::Anything')->resultset('ImportResults'); 
 #    return $c->model('DBIC')->resultset('Type'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/ItemValues.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/ItemValues.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/ItemValues.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -16,7 +16,8 @@
 { 
     my ($self, $c) = @_;
     $c->log->info("A::M::A::ItemValues .. accepting context\n");
-    return $c->comp('DB::Anything')->resultset('ItemValues'); 
+    return $c->model('Anything')->resultset('ItemValues'); 
+#    return $c->comp('DB::Anything')->resultset('ItemValues'); 
 #    return $c->model('DBIC')->resultset('ItemValues'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/Items.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/Items.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/Items.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -4,12 +4,13 @@
 use Scalar::Util 'blessed';
 use base qw/Catalyst::Enzyme::CRUD::Model::DBIC DB::Anything::Items/;
 # use base qw/Catalyst::Enzyme::CRUD::Model::DBIC Anything::Model::Anything/;
+use Data::Dumper;
 use strict;
 
 sub ACCEPT_CONTEXT
 {
     my ($self, $c) = @_;
-    return $c->comp('DB::Anything')->resultset('Items');
+    return $c->model('Anything')->resultset('Items');
 }
 
 

Modified: trunk/Anything/lib/Anything/Model/Anything/MajorMinor.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/MajorMinor.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/MajorMinor.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,7 @@
 sub ACCEPT_CONTEXT 
 { 
     my ($self, $c) = @_;
-    return $c->model('DB::Anything')->resultset('MajorMinor'); 
+    return $c->model('Anything')->resultset('MajorMinor'); 
 #    return $c->model('DBIC')->resultset('Relationships'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/Relationships.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/Relationships.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/Relationships.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -8,7 +8,8 @@
 sub ACCEPT_CONTEXT 
 { 
     my ($self, $c) = @_;
-    return $c->comp('DB::Anything')->resultset('Relationships'); 
+    return $c->model('Anything')->resultset('Relationships'); 
+#    return $c->comp('DB::Anything')->resultset('Relationships'); 
 #    return $c->model('DBIC')->resultset('Relationships'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/Type.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/Type.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/Type.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -20,7 +20,8 @@
 { 
     my ($self, $c) = @_;
     $c->log->info("A::M::A::Type .. accepting context\n");
-    return $c->comp('DB::Anything')->resultset('Type'); 
+    return $c->model('Anything')->resultset('Type'); 
+#    return $c->comp('DB::Anything')->resultset('Type'); 
 #    return $c->model('DBIC')->resultset('Type'); 
 }
 

Modified: trunk/Anything/lib/Anything/Model/Anything/TypeAttributes.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/TypeAttributes.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/TypeAttributes.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -9,7 +9,8 @@
 sub ACCEPT_CONTEXT 
 { 
     my ($self, $c) = @_;
-    return $c->comp('DB::Anything')->resultset('TypeAttributes'); 
+    return $c->model('Anything')->resultset('TypeAttributes'); 
+#    return $c->comp('DB::Anything')->resultset('TypeAttributes'); 
 }
 __PACKAGE__->mk_classdata(qw/config/);
 

Modified: trunk/Anything/lib/Anything/Model/Anything/TypeFields.pm
===================================================================
--- trunk/Anything/lib/Anything/Model/Anything/TypeFields.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything/Model/Anything/TypeFields.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -10,7 +10,8 @@
 sub ACCEPT_CONTEXT 
 { 
     my ($self, $c) = @_;
-    return $c->model('DB::Anything')->resultset('TypeFields'); 
+    return $c->model('Anything')->resultset('TypeFields'); 
+#    return $c->model('DB::Anything')->resultset('TypeFields'); 
 #    return $c->model('DBIC')->resultset('TypeFields'); 
 }
 

Modified: trunk/Anything/lib/Anything.pm
===================================================================
--- trunk/Anything/lib/Anything.pm	2007-04-05 21:24:37 UTC (rev 3179)
+++ trunk/Anything/lib/Anything.pm	2007-04-08 01:06:29 UTC (rev 3180)
@@ -45,18 +45,8 @@
                                      ignore_extensions => [],
                                  },                     
                      'View::TToolkit' => {
-                         DUMP_CONFIG => 1,
+#                         DUMP_CONFIG => 1,
                          EVAL_PERL => 1,
-#                          LOAD_TEMPLATES => [ 
-#                                   Template::Provider->new(),
-#                                   Template::Provider::DBI->new(
-#                                           DBI_DSN => 'dbi:DB2:Anything',
-#                                           DBI_USER => 'missys',
-#                                           DBI_PASSWD => 'missys',
-#                                           DBI_FILEFIELD => 'template',
-#                                                                ),
-#                                              ] },
-
                          PROVIDERS => [ 
                                         {
                                             name => 'DBI',
@@ -123,7 +113,8 @@
 sub auto : Private
 {
     my ( $self, $c ) = @_;
-    $c->stash->{types} = [ $c->comp('DB::Anything')->menu_list(undef, undef, $c->check_user_roles('Admin')) ];
+#    $c->stash->{types} = [ $c->comp('DB::Anything')->menu_list(undef, undef, $c->check_user_roles('Admin')) ];
+    $c->stash->{types} = [ $c->model('Anything')->menu_list(undef, undef, $c->check_user_roles('Admin')) ];
     $c->stash->{page_title} = '';
     
     # Alternate uri type, /type/objname
@@ -137,11 +128,13 @@
         $command ||= 'view';
         $c->log->info("Parsing: $type $name $command");
         return 1 if($command !~ /(edit|view|list|delete)/);
-        my $type = $c->comp('DB::Anything')->resultset('Type')->
+        my $type = $c->model('Anything')->resultset('Type')->
+#        my $type = $c->comp('DB::Anything')->resultset('Type')->
           find({Name => ucfirst($type)});
         if($type)
         {
-            my $item = $c->comp('DB::Anything')->resultset('Items')->
+            my $item = $c->model('Anything')->resultset('Items')->
+#            my $item = $c->comp('DB::Anything')->resultset('Items')->
               find({TypeID => $type->ID, Name => ucfirst($name)});
             if($item)
             {




More information about the Bast-commits mailing list