Update of /cvsroot/openinteract/OpenInteract2/extra_packages/delicious_tags/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16198/OpenInteract2
Added Files:
DeliciousTagWatcher.pm
Log Message:
add config watcher
--- NEW FILE: DeliciousTagWatcher.pm ---
package OpenInteract2::DeliciousTagWatcher;
# $Id: DeliciousTagWatcher.pm,v 1.1 2004/10/26 03:29:02 lachoy Exp $
use strict;
$OpenInteract2::DeliciousTagWatcher::VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
sub update {
my ( $class, $type, $config ) = @_;
return unless ( $type eq 'spops' and ref $config eq 'HASH' );
if ( $config->{is_taggable} eq 'yes' ) {
$config->{isa} ||= [];
push @{ $config->{isa} }, 'OpenInteract2::DeliciousTaggableObject';
}
}
1;
__END__
=head1 NAME
OpenInteract2::DeliciousTagWatcher - Configuration watcher to look for 'is_taggable'
=head1 SYNOPSIS
[myspops]
class = OpenInteract2::Foo
...
is_taggable = yes
# At startup OpenInteract2::Foo will have
# OpenInteract2::DeliciousTaggableObject in its 'isa'
=head1 DESCRIPTION
Configuration initializer to add a shortcut to SPOPS configuration --
a 'is_taggable = yes' will result in the SPOPS class getting
L<OpenInteract2::DeliciousTaggableObject> in its 'isa'.
=head1 SEE ALSO
L<OpenInteract2::Config::Initializer>
=head1 COPYRIGHT
Copyright (c) 2004 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHORS
Chris Winters E<lt>ch...@cw...E<gt>
|