HTML::MobileJp::Filter::Dummy - Dummy filter


HTML-MobileJp-Filter documentation Contained in the HTML-MobileJp-Filter distribution.

Index


Code Index:

NAME

Top

HTML::MobileJp::Filter::Dummy - Dummy filter

SYNOPSIS

Top

  - module: Dummy

DESCRIPTION

Top

HTML の最初と最後に config の prefix の値と suffix の値を付けて 返すだけのダミーモジュールです。

CONFIG AND DEFAULT VALUES

Top

  prefix => 'dummy:{',
  suffix => '}',

AUTHOR

Top

Naoki Tomita <tomita@cpan.org>


HTML-MobileJp-Filter documentation Contained in the HTML-MobileJp-Filter distribution.

package HTML::MobileJp::Filter::Dummy;
use Any::Moose;

with 'HTML::MobileJp::Filter::Role';

has '+config' => (
    default => sub {{
        prefix => 'dummy:{',
        suffix => '}',
    }},
);

sub filter {
    my ($self, $content) = @_;
    
    return join('',
        $self->config->{prefix},
        $content->stringfy,
        $self->config->{suffix},
    );
}

1;
__END__