http://www.perlmonks.org?node_id=571116


in reply to Where to keep images so a module can find them

Any relative path, such as "Images/foo.png", will use Perl's current working directory, and if the module happens to exist in the same directory, then it will find the file.

My point is that it's probably more useful (and better practice) to put images into the user's home dir, or a system dir ('/usr/local/xyz'). Then your module can run through a list of default dirs (~/.xyx/Images, /usr/local/xyz/Images etc) until it finds the file it's looking for.

  • Comment on Re: Where to keep images so a module can find them