Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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
Domain Nodelet?
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 chilling in the Monastery: (4)
As of 2022-09-29 14:08 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (125 votes). Check out past polls.