X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FPurePerl.pm;h=ad1c6248c8a9adbc58be20ec9cd4aa2caa771d42;hb=007481ba62fece04677f0a81f964a58679262e4e;hp=470fbd73e8f2eacef59460b2b0389b8d77ec3600;hpb=e058b279f94cfd76ca59d7972209e1b346492db9;p=gitmo%2FMouse.git diff --git a/lib/Mouse/PurePerl.pm b/lib/Mouse/PurePerl.pm index 470fbd7..ad1c624 100644 --- a/lib/Mouse/PurePerl.pm +++ b/lib/Mouse/PurePerl.pm @@ -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) = @_;