Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2019-05-23 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (147 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!