in reply to Fixing nits with $object->can($method);

Frequently when writing classes we might import (knowingly or otherwise) functions to help our class, but we don't want people to rely on them or, for that matter, to call them.

Except, of course, when we do ;-) I often use import as a poor man's mixin.

  • Comment on Re: Fixing nits with $object->can($method);

Replies are listed 'Best First'.
Re^2: Fixing nits with $object->can($method);
by xdg (Monsignor) on Dec 06, 2005 at 14:34 UTC
    I often use import as a poor man's mixin.

    I tend to think of it more like a poor man's trait.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      I tend to think of it more like a poor man's trait.

      Indeed. All depends on your definition of trait and mixing ;-)