in reply to Re: Passing a reference to a subroutine in a constructor
in thread Passing a reference to a subroutine in a constructor

Your approach only seems to work for me when the package is in the same file. All of our classes/packages live in seperate files. Could that have an impact?

DrSax

  • Comment on Re: Re: Passing a reference to a subroutine in a constructor

Replies are listed 'Best First'.
Re: Re: Re: Passing a reference to a subroutine in a constructor
by liz (Monsignor) on Aug 22, 2003 at 19:22 UTC
    Just wondering: have you actually -use-d or -require-d the other packages?

    I realize this is equivalent to asking whether the computer is plugged in, but you never know ;-)

    Liz

      Yes. I have "use Sort" (or its real equivalent) in the package.

      I wish that I could supply it dynamically in my code without the class having to know about it, though..."

      DrSax

        ...I wish that I could supply it dynamically in my code without the class having to know about it, though...

        You could probably play some tricks with sub UNIVERSAL::AUTOLOAD {}

        ;-)

        Liz