Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Looking for suitable spells to get open to return a filehandle from a module

by talexb (Chancellor)
on Nov 28, 2016 at 13:41 UTC ( [id://1176700]=note: print w/replies, xml ) Need Help??


in reply to Re: Looking for suitable spells to get open to return a filehandle from a module
in thread SOLVED: Looking for suitable spells to get open to return a filehandle from a module

This is a fair question, and I appreciate that it has the potential to be a disaster.

I'm running scripts that do some ETL processing, and it would be handy to be able to version the result reports so that I could go back and see how this run's results compared to the previous result's runs. The tricky part is creating something relatively lightweight that I can sneak onto the command line, rather than remember to save the previous run's results (mv results.txt results.txt-5, for example).

I've also been meaning to contribute something to CPAN for far too long, and this is something relatively innocuous that might be useful to someone, somewhere. I could be using git for this -- but I need to stretch a little, and write something useful.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^3: Looking for suitable spells to get open to return a filehandle from a module
by kikuchiyo (Hermit) on Nov 28, 2016 at 14:03 UTC

    It's good to know that you are aware of the pitfalls.

    Still, I'd recommend that you use a VCS (git or mercurial) under the hood for this. They are optimized to store and retrieve previous versions (that is their primary job after all), they give you tools to compare versions, and they give you context for each version you commit (or your module commits).

    Yes, you could say that you don't really need all that, you just need something that hides and automatizes that mv results.txt results.txt-5 step, but little projects like this tend to accrete features and use cases, and before you know, you're stuck with an underdesigned, metastatised monster of a system.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2025-07-18 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.