add MANIFEST, add new test, real 0.02 :) 0.02
Brandon L Black [Sat, 12 May 2007 21:24:22 +0000 (21:24 +0000)]
MANIFEST [new file with mode: 0644]
t/15pkg_gen.t [new file with mode: 0644]

diff --git a/MANIFEST b/MANIFEST
new file mode 100644 (file)
index 0000000..ff7ada2
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,24 @@
+ChangeLog
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Build.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/MRO/Compat.pm
+Makefile.PL
+MANIFEST                       This list of files
+META.yml
+README
+t/01use.t
+t/02pod.t
+t/03pod_coverage.t
+t/10basic.t
+t/15pkg_gen.t
+t/20mros.t
diff --git a/t/15pkg_gen.t b/t/15pkg_gen.t
new file mode 100644 (file)
index 0000000..9c2daf3
--- /dev/null
@@ -0,0 +1,29 @@
+#!./perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+BEGIN { use_ok('MRO::Compat') }
+
+{
+    package Foo;
+    our @ISA = qw//;
+}
+
+my $f_gen = mro::get_pkg_gen('Foo');
+ok($f_gen > 0, 'Foo pkg_gen > 0');
+
+{
+    no warnings 'once';
+    *Foo::foo_func = sub { 123 };
+}
+my $new_f_gen = mro::get_pkg_gen('Foo');
+ok($new_f_gen > $f_gen, 'Foo pkg_gen incs for methods');
+$f_gen = $new_f_gen;
+
+@Foo::ISA = qw/Bar/;
+$new_f_gen = mro::get_pkg_gen('Foo');
+ok($new_f_gen > $f_gen, 'Foo pkg_gen incs for @ISA');
+