BUILDARGS not invoked by 'new_object'

[email protected] (Peter Shangov)
Newsgroups perl.moose
Message-ID <[email protected]>
Hi all,

It appears that if I create an object with $metaclass->new_object(), BUILDARGS will not be executed, e.g.:


  {
      package Foo;
      use Moose 2.0603;
    
      sub BUILDARGS { warn "Building args"; return {} }
  }

  Foo->new; # warns
  Foo->meta->new_object; # doesn't

The same does not apply to BUILD, which will be executed in both cases. Is this the desired behaviour?


Thanks,

--Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.