Depend on a Test::More with done_testing support.
[p5sagit/Devel-Declare.git] / t / no-bareword.t
CommitLineData
2424de2d 1use strict;
2use warnings;
3use Test::More;
4
5our $i;
6BEGIN { $i = 0 };
7
8sub method { }
9BEGIN {
10 require Devel::Declare;
11 Devel::Declare->setup_for(
12 __PACKAGE__,
13 { "method" => { const => sub { $i++ } } },
14 );
15}
16
17{
18 package Foo;
19 sub method { }
20}
21
22Foo->method;
23BEGIN { is($i, 0) }
24
25my @foo = (method => 123);
26TODO: {
27 BEGIN {
28 local $TODO = 'fat commas not quoting barewords';
29 is($i, 0);
30 }
31}
32
33done_testing;