| 1 | package OpenInteract2::Filter::AllCaps; | ||
| 2 | |||
| 3 | # $Id: AllCaps.pm,v 1.2 2005/03/18 04:09:50 lachoy Exp $ | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use Log::Log4perl qw( get_logger ); | ||
| 7 | use OpenInteract2::Constants qw( :log ); | ||
| 8 | |||
| 9 | $OpenInteract2::Filter::AllCaps::VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/); | ||
| 10 | |||
| 11 | sub update { | ||
| 12 | my ( $class, $action, $type, $content ) = @_; | ||
| 13 | return unless ( $type eq 'filter' ); | ||
| 14 | my $log = get_logger( LOG_APP ); | ||
| 15 | $log->is_info && $log->info( "Running ALLCAPS filter on content" ); | ||
| 16 | $$content =~ tr/a-z/A-Z/; | ||
| 17 | } | ||
| 18 | |||
| 19 | __END__ |