use Test::More;
use lib 't/lib';
-plan tests => 19;
+plan tests => 15;
use_ok('TestApp');
is($app->_role_from_plugin($_), 'TestApp::Plugin::'.$_)
for(qw/Foo/);
+
+
is( $app->foo, "original foo", 'original foo value');
is( $app->bar, "original bar", 'original bar value');
is( $app->bor, "original bor", 'original bor value');
ok($app->load_plugin('Baz'), "Loaded Baz");
is( $app->baz, "plugin baz", 'added baz via plugin');
-is( $app->bar, "baz'd bar override bar", 'baz extension for bar using around');
ok($app->load_plugin('Foo'), "Loaded Foo");
is( $app->foo, "around foo", 'around foo via plugin');
-is( $app->bar, "foo'd bar baz'd bar override bar", 'foo extension around baz extension for bar');
-is( $app->baz, "foo'd baz plugin baz", 'foo extension override for baz');
ok($app->load_plugin('+TestApp::Plugin::Bor'), "Loaded Bor");
-is( $app->foo, "bor'd foo around foo", 'bor extension override for foo');
is( $app->bor, "plugin bor", 'override bor via plugin');
+
+#print $app->meta->dump(3);
use Test::More;
use lib 't/lib';
-plan tests => 19;
+plan tests => 15;
use_ok('TestApp2');
ok($app->load_plugin('Baz'), "Loaded Baz");
is( $app->baz, "plugin baz", 'added baz via plugin');
-is( $app->bar, "baz'd bar override bar", 'baz extension for bar using around');
ok($app->load_plugin('Foo'), "Loaded Foo");
is( $app->foo, "around foo 2", 'around foo via plugin');
-is( $app->bar, "foo'd bar 2 baz'd bar override bar", 'foo extension around baz extension for bar');
-is( $app->baz, "foo'd baz 2 plugin baz", 'foo extension override for baz');
ok($app->load_plugin('+TestApp::Plugin::Bor'), "Loaded Bor");
-is( $app->foo, "bor'd foo around foo 2", 'bor extension override for foo');
is( $app->bor, "plugin bor", 'override bor via plugin');
use Test::More;
use lib 't/lib';
-plan tests => 22;
+plan tests => 18;
use_ok('TestApp2');
ok($app->load_plugin('Baz'), "Loaded Baz");
is( $app->baz, "plugin baz", 'added baz via plugin');
-is( $app->bar, "baz'd bar override bar", 'baz extension for bar using around');
ok($app->load_plugin('Foo'), "Loaded Foo");
is( $app->foo, "around foo CNS", 'around foo via plugin');
-is( $app->bar, "foo'd bar CNS baz'd bar override bar", 'foo extension around baz extension for bar');
-is( $app->baz, "foo'd baz CNS plugin baz", 'foo extension override for baz');
ok($app->load_plugin('+TestApp::Plugin::Bor'), "Loaded Bor");
-is( $app->foo, "bor'd foo around foo CNS", 'bor extension override for foo');
is( $app->bor, "plugin bor", 'override bor via plugin');
+++ /dev/null
-package CustomNS::Plugin::Foo::ExtensionFor::Bar;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around bar => sub {
- my ($super, $self) = @_;
- "foo'd bar CNS " . $super->($self);
-};
-
-1;
+++ /dev/null
-package CustomNS::Plugin::Foo::ExtensionFor::Baz;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around baz => sub{
- my $super = shift;
- my $self = shift;
- "foo'd baz CNS " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp::Plugin::Baz::ExtensionFor::Bar;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around bar => sub{
- my ($super, $self) = @_;
- "baz'd bar " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp::Plugin::Bor::ExtensionFor::Foo;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around foo => sub{
- my $super = shift;
- my $self = shift;
- "bor'd foo " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp::Plugin::Foo::ExtensionFor::Bar;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around bar => sub {
- my ($super, $self) = @_;
- "foo'd bar " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp::Plugin::Foo::ExtensionFor::Baz;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around baz => sub{
- my $super = shift;
- my $self = shift;
- "foo'd baz " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp2::Plugin::Foo::ExtensionFor::Bar;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around bar => sub {
- my ($super, $self) = @_;
- "foo'd bar 2 " . $super->($self);
-};
-
-1;
+++ /dev/null
-package TestApp2::Plugin::Foo::ExtensionFor::Baz;
-
-use strict;
-use warnings;
-use Moose::Role;
-
-around baz => sub{
- my $super = shift;
- my $self = shift;
- "foo'd baz 2 " . $super->($self);
-};
-
-1;