From: Dave Rolsky Date: Thu, 11 Jun 2009 08:02:38 +0000 (-0500) Subject: Remove useless BEGIN and tidy code X-Git-Tag: 0.82~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6735458d18836bd8972a99d5a329f88b5fcc0f45;p=gitmo%2FMoose.git Remove useless BEGIN and tidy code --- diff --git a/t/300_immutable/015_immutable_destroy.t b/t/300_immutable/015_immutable_destroy.t index 32b6fe4..a837030 100644 --- a/t/300_immutable/015_immutable_destroy.t +++ b/t/300_immutable/015_immutable_destroy.t @@ -1,19 +1,18 @@ -#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; -BEGIN { +{ package FooBar; use Moose; - has 'name' => (is => 'ro'); + has 'name' => ( is => 'ro' ); sub DESTROY { shift->name } __PACKAGE__->meta->make_immutable; } -my $f = FooBar->new(name => "SUSAN"); +my $f = FooBar->new( name => "SUSAN" ); -is($f->DESTROY, "SUSAN", "Did moose overload DESTROY?"); +is( $f->DESTROY, "SUSAN", "Did moose overload DESTROY?" );