12 my $app = TestApp2->new;
14 is($app->_role_from_plugin('+'.$_), $_)
15 for(qw/MyPrettyPlugin My::Pretty::Plugin/);
17 is($app->_role_from_plugin($_), 'TestApp2::Plugin::'.$_)
20 is($app->_role_from_plugin($_), 'TestApp::Plugin::'.$_)
23 $app->_plugin_app_ns(['CustomNS', $app->_plugin_app_ns]);
25 is($app->_role_from_plugin($_), 'CustomNS::Plugin::'.$_)
28 is($app->_role_from_plugin($_), 'TestApp::Plugin::'.$_)
31 is( $app->foo, "original foo", 'original foo value');
32 is( $app->bar, "original bar", 'original bar value');
33 is( $app->bor, "original bor", 'original bor value');
35 ok($app->load_plugin('Bar'), "Loaded Bar");
36 is( $app->bar, "override bar", 'overridden bar via plugin');
38 ok($app->load_plugin('Baz'), "Loaded Baz");
39 is( $app->baz, "plugin baz", 'added baz via plugin');
40 is( $app->bar, "baz'd bar override bar", 'baz extension for bar using around');
42 ok($app->load_plugin('Foo'), "Loaded Foo");
43 is( $app->foo, "around foo CNS", 'around foo via plugin');
44 is( $app->bar, "foo'd bar CNS baz'd bar override bar", 'foo extension around baz extension for bar');
45 is( $app->baz, "foo'd baz CNS plugin baz", 'foo extension override for baz');
47 ok($app->load_plugin('+TestApp::Plugin::Bor'), "Loaded Bor");
48 is( $app->foo, "bor'd foo around foo CNS", 'bor extension override for foo');
49 is( $app->bor, "plugin bor", 'override bor via plugin');