projects
/
gitmo/Moose.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
add with_immutable test helper
[gitmo/Moose.git]
/
lib
/
Test
/
Moose.pm
diff --git
a/lib/Test/Moose.pm
b/lib/Test/Moose.pm
index
b27e8b1
..
ed78dd3
100644
(file)
--- a/
lib/Test/Moose.pm
+++ b/
lib/Test/Moose.pm
@@
-16,6
+16,7
@@
my @exports = qw[
meta_ok
does_ok
has_attribute_ok
+ with_immutable
];
Sub::Exporter::setup_exporter({
@@
-70,6
+71,13
@@
sub has_attribute_ok ($$;$) {
}
}
+sub with_immutable (&@) {
+ my $block = shift;
+ $block->();
+ $_->meta->make_immutable for @_;
+ $block->();
+}
+
1;
__END__