in reply to Creating new objects from within a package

Just to second herveus, indirect method calls ( meth class() ) are, in general, funky and unsupported. You should probably be using class->meth() instead, as that leaves no ambiguities.
  • Comment on Re: Creating new objects from within a package

Replies are listed 'Best First'.
Re^2: Creating new objects from within a package
by gellyfish (Monsignor) on Jul 21, 2004 at 14:47 UTC

    I wouldn't go so far as to say they are unsupported, however there are certainly issues of disambiguation as the OP has seen

    /J\

      Neither does it "leaves no ambiguities". T->new() can still be ambiguous, it is just not as ambiguous. If you want to leave no ambiguities, write 'T'->new().

      - tye