From: Dave Rolsky Date: Sat, 25 Sep 2010 18:26:48 +0000 (-0500) Subject: Some tidying X-Git-Tag: 1.15~102 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24d9c065f900ee4e14479ec4355674e38432c0f5;p=gitmo%2FMoose.git Some tidying --- diff --git a/t/070_native_traits/001_trait_counter.t b/t/070_native_traits/001_trait_counter.t index 0fa2c9a..af44317 100644 --- a/t/070_native_traits/001_trait_counter.t +++ b/t/070_native_traits/001_trait_counter.t @@ -8,17 +8,17 @@ use Test::Exception; use Test::More; use Test::Moose; -my %handles = ( - inc_counter => 'inc', - inc_counter_2 => [ inc => 2 ], - dec_counter => 'dec', - dec_counter_2 => [ dec => 2 ], - reset_counter => 'reset', - set_counter => 'set', - set_counter_42 => [ set => 42 ], -); - { + my %handles = ( + inc_counter => 'inc', + inc_counter_2 => [ inc => 2 ], + dec_counter => 'dec', + dec_counter_2 => [ dec => 2 ], + reset_counter => 'reset', + set_counter => 'set', + set_counter_42 => [ set => 42 ], + ); + my $name = 'Foo1'; sub build_class { @@ -47,13 +47,14 @@ my %handles = ( { run_tests(build_class); - run_tests(build_class(lazy => 1)); + run_tests( build_class( lazy => 1 ) ); } sub run_tests { my ( $class, $handles ) = @_; can_ok( $class, $_ ) for sort keys %{$handles}; + with_immutable { my $obj = $class->new();