adding make_immutable sugar
Stevan Little [Wed, 6 Feb 2008 20:23:51 +0000 (20:23 +0000)]
Changes
lib/Moose.pm

diff --git a/Changes b/Changes
index 9570b53..77abe95 100644 (file)
--- a/Changes
+++ b/Changes
@@ -7,6 +7,8 @@ Revision history for Perl extension Moose
         - added tests for this (thanks thepler)
       - 'has' now dies if you don't pass in name 
         value pairs
+      - added the 'make_immutable' keyword as a shortcut
+        to __PACKAGE__->meta->make_immutable
 
     * Moose::Meta::Class
       Moose::Meta::Method::Constructor
index e5c8a28..ca5ac15 100644 (file)
@@ -161,6 +161,12 @@ use Moose::Util ();
                 $class->meta->add_augment_method_modifier( $name => $method );
             };
         },
+        make_immutable => sub {
+            my $class = $CALLER;
+            return subname 'Moose::make_immutable' => sub {
+                $class->meta->make_immutable(@_)
+            };            
+        },        
         confess => sub {
             return \&Carp::confess;
         },