LoveVector の、タグ perl に関係のある記事群です。
いまの PlaggerLDR は icon がつかなくて mixi とかが悲しいので。
Index: lib/Plagger/Plugin/Store/DBIC.pm
===================================================================
--- lib/Plagger/Plugin/Store/DBIC.pm (revision 789)
+++ lib/Plagger/Plugin/Store/DBIC.pm (working copy)
@@ -103,10 +103,15 @@
link => $feed_entry->link,
});
- for my $attr (qw/title author summary date body rate/) { # todo: icon
+ for my $attr (qw/title author summary date rate/) { # todo: restruct
$entry->$attr( $feed_entry->$attr )
if defined $feed_entry->$attr && (!$entry->$attr or $entry->$attr ne $feed_entry->$attr);
}
+ if (defined $feed_entry->body) {
+ my $tt = $c->template;
+ $tt->process('dbic_notify.tt', { entry => $feed_entry }, \my $body) or $c->error($tt->error);
+ $entry->body($body) if !$entry->body or $entry->body ne $body;
+ }
$entry->insert_or_update if $entry->is_changed;
# meta
assets/plugins/Store-DBIC/dbic_notify.tt:
<div>
[% USE util = Plagger.Util -%]
[% IF entry.icon %]<div><img [% util.dumbnail(entry.icon, width=150, height=60) %] align="right" src="[% entry.icon.url | html %]" alt="" /></div>
[% END -%]
[% IF entry.body.match('(?i)^<p[ >]') %][% entry.body %][% ELSE %]<div style="padding: 1em 0">[% entry.body %]</div>[% END %]
</div>
スキーマを変えて PlaggerLDR 側でやるのが正攻法だと思うけど,面倒なのでとりあえずこれで。
良く考えたらこれ Filter:: 書くべきだったかな。まぁいいや。
5.56 2005-11-16 10:33:00
- Fixed FastCGI engine to not clobber the global %ENV on each
request. (Sam Vilain)
- Updated benchmarking to work with detach
- Fixed dispatcher, so $c->req->action(undef) works again
- Updated Catalyst::Test to use HTTP::Request::AsCGI
- Added -pidfile to external FastCGI server.
5.55 2005-11-15 12:55:00
- Fixed multiple cookie handling
5.54 2005-11-14 22:55:00
- Fixed a Module::Pluggable::Fast related bug
5.53 2005-11-14 15:55:00
- Removed t/04prereq.t that was testing for non-required
modules.
なんでこんなゾロ目時刻(というか 55 分)ばっかりなの?