general failures if you don't have the author side dependencies
installed
+ * Test::Moose
+ - Added a with_immutable test function, to run a block of tests with
+ and without certain classes being immutable. (doy)
+
0.94
* Moose::Cookbook::Basics::Recipe4
- Grammar error [rt.cpan.org #51791] (Amir E. Aharoni)
meta_ok
does_ok
has_attribute_ok
+ with_immutable
];
Sub::Exporter::setup_exporter({
}
}
+sub with_immutable (&@) {
+ my $block = shift;
+ $block->();
+ $_->meta->make_immutable for @_;
+ $block->();
+}
+
1;
__END__
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::Builder::Tester tests => 2;
+use Test::More;
+
+BEGIN {
+ use_ok('Test::Moose');
+}
+
+{
+ package Foo;
+ use Moose;
+}
+
+package main;
+
+test_out("ok 1", "not ok 2");
+test_fail(+2);
+with_immutable {
+ ok(Foo->meta->is_mutable);
+} qw(Foo);
+
+test_test('with_immutable');