in reply to (tye)Re2: Wrapping requires in a package...
in thread Wrapping requires in a package...

I don't think it matters as long as the code he's do()ing doesn't have any use of __PACKAGE__ constructs or declare "package main" anywhere. The subs will be defined in the right package.
  • Comment on Re: (tye)Re2: Wrapping requires in a package...

Replies are listed 'Best First'.
(tye)Re3: Wrapping requires in a package...
by tye (Sage) on Sep 08, 2001 at 09:37 UTC

    But what if two different files do use vars qw( $level ); Will both be trying to share $main::level or will the variables be defined in the requested package like the subroutines (easy enough to check but I wasn't that interested in the problem). Are there more subtle problems? Someone reported to me that they were looking into all of this.

    But the real solution is to turn these files into real packages, which is what I hear is now being done. (:

            - tye (but my friends call me "Tye")