Tidy
[gitmo/Mouse.git] / lib / Mouse / PurePerl.pm
index 470fbd7..ad1c624 100644 (file)
@@ -223,6 +223,16 @@ sub get_all_attributes {
     return values %attrs;
 }
 
+sub new_object {
+    my $self = shift;
+    my %args = (@_ == 1 ? %{$_[0]} : @_);
+
+    my $object = bless {}, $self->name;
+
+    $self->_initialize_object($object, \%args);
+    return $object;
+}
+
 sub _initialize_object{
     my($self, $object, $args, $ignore_triggers) = @_;