test for symbol table/package lookup bug
Steve Scaffidi [Wed, 26 Aug 2009 16:02:41 +0000 (12:02 -0400)]
t/config/test_stem_bug.pl [new file with mode: 0644]

diff --git a/t/config/test_stem_bug.pl b/t/config/test_stem_bug.pl
new file mode 100644 (file)
index 0000000..5f90534
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+
+use strict ;
+use warnings ;
+use Test::More tests => 2;
+use Test::Exception;
+
+use_ok( 'Stem' );
+
+my @config = (
+    {  class   =>      'Foobar',                       },
+       {       class   =>      'Stem::Console',        },
+) ;
+
+
+lives_ok( sub { Stem::Conf::configure( \@config ) }, 'load config from data structure' );
+
+package Foobar ;
+
+sub foobar_cmd { return "FOOBAR!!!\n" }
+
+