I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-12-14 13:10:03-08 by jdhedden in response to 1474
Re: Undefined subroutine &MyClass::new
The problem is that ->new() is a method that is exported by Object::InsideOut, and in the case of runtime loading, is something not available when the parser carries on to your instance() subroutine.

As ->new() is a method, the error can be avoided by invoking it that way:

sub instance { if (defined $instance) { return $instance; } else { my $class = shift; # Extract class from args return $class->new(@_); # Invoke ->new() method } }
Direct Responses: 1482 | Write a response