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

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

by kevbot (Vicar)
on Aug 05, 2018 at 06:22 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-25 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found