More work on tests
Ash Berlin [Mon, 30 Jul 2007 13:44:14 +0000 (13:44 +0000)]
t/lib/MyModule.pm [new file with mode: 0644]
t/lib/MyModule/OwnComponent.pm [new file with mode: 0644]
t/lib/MyModule/Plugin/Foo.pm [new file with mode: 0644]

diff --git a/t/lib/MyModule.pm b/t/lib/MyModule.pm
new file mode 100644 (file)
index 0000000..51295ef
--- /dev/null
@@ -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 (file)
index 0000000..56cff2b
--- /dev/null
@@ -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 (file)
index 0000000..a42dc15
--- /dev/null
@@ -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;