use strict; use warnings FATAL => 'all'; use Test::More qw(no_plan); { package Foo; sub foo { use XML::Tags qw(one two three); , , ; } sub bar { no warnings 'once'; # this is supposed to warn, it's broken } sub baz { use XML::Tags qw(bar); ; } sub quux { use HTML::Tags; , , "YAY", , ; } sub fleem { use XML::Tags qw(woo); my $ent = "one&two"; ; } sub globbery { ; } } is( join(', ', XML::Tags::to_xml_string Foo::foo()), ', , ', 'open tags ok' ); ok(!eval { Foo::bar(); 1 }, 'Death on use of unimported tag'); is( join(', ', XML::Tags::to_xml_string Foo::baz()), '', 'close tag ok' ); is( join('', HTML::Tags::to_html_string Foo::quux), 'YAY', 'HTML tags ok' ); is( join('', XML::Tags::to_xml_string Foo::fleem), '', 'Escaping ok' ); is( join(', ', Foo::globbery), 't/globbery/one, t/globbery/two', 'real glob re-installed ok' );