From: Stevan Little Date: Thu, 31 Jan 2008 18:31:52 +0000 (+0000) Subject: tests X-Git-Tag: 0_37~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee7f68b66970991a721bec1b6f39650c536e9d35;p=gitmo%2FMoose.git tests --- diff --git a/t/300_immutable/005_multiple_demolish_inline.t b/t/300_immutable/005_multiple_demolish_inline.t new file mode 100644 index 0000000..4f543ce --- /dev/null +++ b/t/300_immutable/005_multiple_demolish_inline.t @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Test::More tests => 3; +use Test::Exception; + +BEGIN { + use_ok('Moose'); +} + +{ + package Foo; + use Moose; + + has 'foo' => (is => 'rw', isa => 'Int'); + + sub DEMOLISH { } +} + +{ + package Bar; + use Moose; + + extends qw(Foo); + has 'bar' => (is => 'rw', isa => 'Int'); + + sub DEMOLISH { } +} + +lives_ok { + Bar->new(); +} 'Bar->new()'; + +lives_ok { + my $bar = Bar->new(); + $bar->meta->make_immutable; +} 'Bar->meta->make_immutable'; \ No newline at end of file