/usr/local/CPAN/HTML-MobileJp-Filter/HTML/MobileJp/Filter/Role.pm


package HTML::MobileJp::Filter::Role;
use Any::Moose '::Role';

has config => (
    is      => 'rw',
    isa     => 'Maybe[HashRef]',
    default => sub { {} },
);

has mobile_agent => (
    is  => 'rw',
    isa => 'HTTP::MobileAgent',
);

requires 'filter';

sub BUILD {
    my $self = shift;
    
    $self->config({
        %{ $self->meta->get_attribute('config')->default->() },
        %{ $self->config || {} },
    });

    $self->init;
}

sub init { }

1;