1use Test::Base;
2
3plan tests => ~~blocks;
4
5run_is;
6
7__END__
8=== Test One
9--- encoded base64_decode
10SSBMb3ZlIEx1Y3kK
11
12--- decoded
13I Love Lucy
14
15
16
17=== Test Two
18
19--- encoded
20c3ViIHJ1bigmKSB7CiAgICBteSAkc2VsZiA9ICRkZWZhdWx0X29iamVjdDsKICAgIG15ICRjYWxs
21YmFjayA9IHNoaWZ0OwogICAgZm9yIG15ICRibG9jayAoJHNlbGYtPmJsb2NrcykgewogICAgICAg
22ICZ7JGNhbGxiYWNrfSgkYmxvY2spOwogICAgfQp9Cg==
23
24--- decoded base64_encode
25
26sub run(&) {
27    my $self = $default_object;
28    my $callback = shift;
29    for my $block ($self->blocks) {
30        &{$callback}($block);
31    }
32}
33
34
35