From: Brandon L Black Date: Sat, 12 May 2007 21:24:22 +0000 (+0000) Subject: add MANIFEST, add new test, real 0.02 :) X-Git-Tag: 0.02^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71cfadf55f82d2c49d4dbc76f17026d28ab1ccf4;p=gitmo%2FMRO-Compat.git add MANIFEST, add new test, real 0.02 :) --- diff --git a/MANIFEST b/MANIFEST new file mode 100644 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 index 0000000..9c2daf3 --- /dev/null +++ b/t/15pkg_gen.t @@ -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'); +