From: Florian Ragwitz Date: Thu, 13 Aug 2009 20:30:15 +0000 (+0200) Subject: Add tests for not interpreting various things as barewords when they aren't. X-Git-Tag: 0.005011~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2424de2da29819863a80c3c08f069a523997422e;p=p5sagit%2FDevel-Declare.git Add tests for not interpreting various things as barewords when they aren't. --- diff --git a/t/no-bareword.t b/t/no-bareword.t new file mode 100644 index 0000000..80f9b0d --- /dev/null +++ b/t/no-bareword.t @@ -0,0 +1,33 @@ +use strict; +use warnings; +use Test::More; + +our $i; +BEGIN { $i = 0 }; + +sub method { } +BEGIN { + require Devel::Declare; + Devel::Declare->setup_for( + __PACKAGE__, + { "method" => { const => sub { $i++ } } }, + ); +} + +{ + package Foo; + sub method { } +} + +Foo->method; +BEGIN { is($i, 0) } + +my @foo = (method => 123); +TODO: { + BEGIN { + local $TODO = 'fat commas not quoting barewords'; + is($i, 0); + } +} + +done_testing;