in reply to RE: require in .pm and .pl = blow up?
in thread require in .pm and .pl = blow up?

OK. I'm getting closer to getting this. Thanks for the help.. The problem is that I'm working on a system with severely horrible code, and I can't change existing scripts.. So basically I need a way to 'secretly' require files inside foo.pm without letting main:: know that I required them.. (so existing scripts that depend on the .pl's will not break) Know what I mean? 'do' will force the .pl to be reparsed, but it also remembers what it read, like 'require' do I have to do something yucky like dumping the file into a scalar and eval'ing it?
  • Comment on RE: RE: require in .pm and .pl = blow up?

Replies are listed 'Best First'.
RE: RE: RE: require in .pm and .pl = blow up?
by tye (Sage) on Aug 15, 2000 at 01:53 UTC

    In that particular situation, I'd probably resort to the rather yucky:

    require "vars.pl"; delete $INC{"vars.pl"};

    As slick as that seems, I still think it is pretty yucky. I'd not give up on the political side of getting access to change existing horrible things.

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