Text-Md2Inao

 view release on metacpan or  search on metacpan

lib/Text/Md2Inao/Builder/DSL.pm  view on Meta::CPAN

package Text::Md2Inao::Builder::DSL;
use strict;
use warnings;

use parent qw/Exporter/;
our @EXPORT = qw/case/;

sub case ($&) {
    my ($select, $code) = @_;
    my $class = (caller)[0];
    my $self = $class->new;
    for (split ",", $select) {
        s/\s+//g;
        $self->dispatch_table->{$_} = $code;
    }
}

1;



( run in 1.696 second using v1.01-cache-2.11-cpan-a3c8064c92c )