in reply to Stopping included module breaking test

FindBin is definitely a possibility . . .

However, items that prove problematic to test general indicate a problem with the architecture. Personally, I like to pass configuration files into a module and have them handle both filenames and filehandles. That way, I can use IO::Scalar and File::Temp to test both options, and the code is more reusable, to boot.


  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
  • Comment on Re: Stopping included module breaking test

Replies are listed 'Best First'.
Re^2: Stopping included module breaking test
by loris (Hermit) on May 10, 2005 at 12:46 UTC

    Hello dragonchild,

    I am sure you are right about the architecture being a bit ropey and that this should be corrected. However, I am also interested in the question of how to deal with the effects without having (to get somebody else) to fix the root problem.

    Thanks, loris

      FindBin is the correct answer, then. You will have to make this change to the module.

      • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
      • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"