X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftype_constraints%2Futil_type_reloading.t;fp=t%2Ftype_constraints%2Futil_type_reloading.t;h=af6285dd5f8de64204b2baddfaea0e0b5b97ff1b;hb=829433c47061dd70a608bfcd940113c4172b6950;hp=0000000000000000000000000000000000000000;hpb=51c788414482c813eb48fb417b08ba03134ff1a6;p=gitmo%2FMoose.git diff --git a/t/type_constraints/util_type_reloading.t b/t/type_constraints/util_type_reloading.t new file mode 100644 index 0000000..af6285d --- /dev/null +++ b/t/type_constraints/util_type_reloading.t @@ -0,0 +1,29 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use lib 't/lib', 'lib'; + +use Test::More; + + +$SIG{__WARN__} = sub { 0 }; + +eval { require Foo; }; +ok(!$@, '... loaded Foo successfully') || diag $@; + +delete $INC{'Foo.pm'}; + +eval { require Foo; }; +ok(!$@, '... re-loaded Foo successfully') || diag $@; + +eval { require Bar; }; +ok(!$@, '... loaded Bar successfully') || diag $@; + +delete $INC{'Bar.pm'}; + +eval { require Bar; }; +ok(!$@, '... re-loaded Bar successfully') || diag $@; + +done_testing;