stop using sub::exporter
[gitmo/Eval-Closure.git] / t / canonicalize-source.t
CommitLineData
a304773f 1#!/usr/bin/env perl
2use strict;
3use warnings;
4use Test::More;
5
6use Eval::Closure;
7
8{
9 my $code = eval_closure(
10 source =>
11 'sub {'
12 . '"foo"'
13 . '}',
14 );
15 ok($code, "got code");
16 is($code->(), "foo", "got the right code");
17}
18
19{
20 my $code = eval_closure(
21 source => [
22 'sub {',
23 '"foo"',
24 '}',
25 ],
26 );
27 ok($code, "got code");
28 is($code->(), "foo", "got the right code");
29}
30
31done_testing;