From: Matt S Trout Date: Sat, 5 Dec 2009 06:29:06 +0000 (+0000) Subject: verify with Data::Dump::Streamer X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de39aa891a9cab952356a03e3ed39277178cb673;p=gitmo%2FMooseX-Antlers.git verify with Data::Dump::Streamer --- diff --git a/t/one.t b/t/one.t index e308c44..5694a07 100644 --- a/t/one.t +++ b/t/one.t @@ -33,7 +33,7 @@ sub test_One { foo_called(2 => 'trigger called for setter'); } -my %orig_src = map +($_ => join '', Dump(One->can($_))), qw(new DESTROY one); +my %orig_src = map +($_ => join '', Dump(One->can($_))), qw(new DESTROY foo); my $orig_foo_meta = Dump(One->meta); @@ -48,15 +48,17 @@ my $compiled = $compiler->compiled_source; Class::Unload->unload('One'); Class::MOP::remove_metaclass_by_name('One'); -eval $compiled; die "Shit. failed.\n\n${compiled}\n\nError: $@" if $@; +eval "no warnings; $compiled"; + +die "Shit. failed.\n\n${compiled}\n\nError: $@" if $@; use Data::Dumper::Concise; -my %compiled_src = map +($_ => join '', Dump(One->can($_))), qw(new DESTROY one); +my %compiled_src = map +($_ => join '', Dump(One->can($_))), qw(new DESTROY foo); -#foreach my $method (qw(new DESTROY one)) { -# is($compiled_src{$method}, $orig_src{$method}, "${method} restored ok"); -#} +foreach my $method (qw(new DESTROY foo)) { + is($compiled_src{$method}, $orig_src{$method}, "${method} restored ok"); +} test_One;