[Bast-commits] r8096 - in ironman: IronMan-Web/lib/IronMan/Web/Controller plagger/lib/IronMan plagger/lib/IronMan/Schema/Result

fade at dev.catalyst.perl.org fade at dev.catalyst.perl.org
Sat Dec 12 22:47:49 GMT 2009


Author: fade
Date: 2009-12-12 22:47:48 +0000 (Sat, 12 Dec 2009)
New Revision: 8096

Modified:
   ironman/IronMan-Web/lib/IronMan/Web/Controller/Archive.pm
   ironman/plagger/lib/IronMan/Schema.pm
   ironman/plagger/lib/IronMan/Schema/Result/Post.pm
Log:
add post author and tags to the schema (sorry these needs version files generating)

Modified: ironman/IronMan-Web/lib/IronMan/Web/Controller/Archive.pm
===================================================================
--- ironman/IronMan-Web/lib/IronMan/Web/Controller/Archive.pm	2009-12-12 21:34:35 UTC (rev 8095)
+++ ironman/IronMan-Web/lib/IronMan/Web/Controller/Archive.pm	2009-12-12 22:47:48 UTC (rev 8096)
@@ -27,6 +27,7 @@
     my ( $self, $c ) = @_;
 
     $c->response->body('Matched IronMan::Web::Controller::Archive in Archive.');
+
 }
 
 =head2 year
@@ -52,7 +53,7 @@
 	my $dt_month = DateTime->new(
 	   'year'   => $year,
        'month'  => $month,
-       'day'   => 1,
+       'day'    => 1,
        'hour'   => 0,
        'minute' => 0,
        'second' => 0,
@@ -74,7 +75,7 @@
 	my $dt_day = DateTime->new(
 	   'year'   => $year,
        'month'  => $month,
-       'day'   => $day,
+       'day'    => $day,
        'hour'   => 0,
        'minute' => 0,
        'second' => 0,

Modified: ironman/plagger/lib/IronMan/Schema/Result/Post.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema/Result/Post.pm	2009-12-12 21:34:35 UTC (rev 8095)
+++ ironman/plagger/lib/IronMan/Schema/Result/Post.pm	2009-12-12 22:47:48 UTC (rev 8096)
@@ -44,7 +44,15 @@
     body_filtered => {
         data_type => 'text',
         is_nullable => 1,
-    }
+    },
+    author => {
+        data_type => 'varchar',
+        size => 1024,
+    },
+    tags => {
+        data_type => 'varchar',
+        size => 1024,
+    },
     );
 
 __PACKAGE__->set_primary_key('post_id');
@@ -52,4 +60,9 @@
 
 __PACKAGE__->belongs_to('feed', 'IronMan::Schema::Result::Feed', 'feed_id');
 
+__PACKAGE__->inflate_column('tags', {
+        'inflate' => sub { return [split(/,/,$_[0])] },
+        'deflate' => sub { return join(',', @{$_[0]}) },
+    });
+
 1;

Modified: ironman/plagger/lib/IronMan/Schema.pm
===================================================================
--- ironman/plagger/lib/IronMan/Schema.pm	2009-12-12 21:34:35 UTC (rev 8095)
+++ ironman/plagger/lib/IronMan/Schema.pm	2009-12-12 22:47:48 UTC (rev 8096)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 use base 'DBIx::Class::Schema';
 




More information about the Bast-commits mailing list