Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Reading/writing to a module's data file

by kevbot (Priest)
on Aug 05, 2018 at 06:22 UTC ( #1219870=note: print w/replies, xml ) Need Help??

in reply to Reading/writing to a module's data file

Here are a couple modules that might help you. FindBin can help with determining the location of a data file, and Test::File::ShareDir will allow your tests to access the files in your share dir even if you have not installed the module yet.

This article may also give you some ideas.

Writing to a data file that is in the install location of your module seems a bit strange to me. Could you address your issue by changing your module(s) such that it uses a config file? The config file could contain the oauth info that needs to be updated. There are many modules that can read/write config information, e.g. Config::JSON.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1219870]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-04-17 08:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found