On Mar 5, 2010, at 9:06 AM, Emmanuel Quevillon wrote:
Joel Bernstein wrote:
On 5 Mar 2010, at 13:37, Emmanuel Quevillon wrote:
By the way, I use a self coded 'new' method to create my object.
Would it be the problem?
Yes. But you omitted the code that doesn't work, so... Good luck!
/joel
oops sorry,
sub new {
my($class, %args) = @_;
my $self = $class->SUPER::new(%args);
$self->_init(%args);
$self->_build_types(%args);
return $self;
}
Later in the code is try $self->so_type(), nothing is returned...
Honestly, this should work, however you very well might be doing
something in _init or _build_types that causes the problem. Perhaps
showing us some more code would help.
You might also try changing your "new" to this:
sub BUILD {
my($self, $args) = @_;
$self->_init(%$args);
$self->_build_types(%$args);
}
.. which is a little more Moosey.
- stevan