From: Ash Berlin Date: Mon, 30 Jul 2007 13:44:14 +0000 (+0000) Subject: More work on tests X-Git-Tag: v1.001000~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7e9a4526592b9feb1899f3d9f956bed5862c781;p=p5sagit%2FClass-C3-Componentised.git More work on tests --- diff --git a/t/lib/MyModule.pm b/t/lib/MyModule.pm new file mode 100644 index 0000000..51295ef --- /dev/null +++ b/t/lib/MyModule.pm @@ -0,0 +1,14 @@ +package # hide from pause + MyModule; + +use base 'Class::C3::Componentised'; + +sub component_base_class { "MyModule::Plugin" } + +sub message { "MyModule" } + +sub new { + return bless {}, shift; +} + +1; diff --git a/t/lib/MyModule/OwnComponent.pm b/t/lib/MyModule/OwnComponent.pm new file mode 100644 index 0000000..56cff2b --- /dev/null +++ b/t/lib/MyModule/OwnComponent.pm @@ -0,0 +1,12 @@ +package # hide from pause + MyModule::OwnComponent; + +use Class::C3; + +sub message { + my $self = shift; + + return join(" ", "OwnComponent", $self->next::method); +} + +1; diff --git a/t/lib/MyModule/Plugin/Foo.pm b/t/lib/MyModule/Plugin/Foo.pm new file mode 100644 index 0000000..a42dc15 --- /dev/null +++ b/t/lib/MyModule/Plugin/Foo.pm @@ -0,0 +1,11 @@ +package # hide from pause + MyModule::Plugin::Foo; + +use Class::C3; + +sub message { + $DB::single = 1; + join(" ", "Foo", shift->next::method) +} + +1;