package Plagger::Plugin::Filter::iSightEnclosure; use strict; use base qw( Plagger::Plugin ); use File::Temp qw(tempdir); sub register { my($self, $context) = @_; $context->register_hook( $self, 'aggregator.finalize' => \&shutter, 'update.entry.fixup' => \&filter, 'update.fixup' => \&cleanup, ); } sub rule_hook { 'update.entry.fixup' } sub shutter { my($self, $context) = @_; $self->{dir} = tempdir