good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Flock to Rename Directoryby Marshall (Canon) |
on Sep 18, 2009 at 08:23 UTC ( [id://796047]=note: print w/replies, xml ) | Need Help?? |
I think that you are vasty under estimating the complexity
of implementing a robust flock (file lock) mechanism by
yourself. You say: Im a novice . Nothing wrong with that, everybody starts. I am saying that this flock() stuff can be a lot more complex in the "always works" details than you think. There is a big difference between "works all the time" and works "almost all the time". The coordination and sequencing of asynchronous events is hard -> this is NOT something that I would recommend for a self proclaimed novice -> the pitfalls are many! At the same time, I think that you are over estimating the effort to do some simple SQL statements (Perl is great at SQL stuff!). I think the total amount of SQL related code will be like 1/2 page in your application.
One of the issues with a DB is how to set it up, maintain it, etc. The rationale behind my recommendation of DB::CSV is to get the SQL part figured out. You will wind up with an application that "works" albiet not as fast as it could. All the SQL code will "port" to the "fancy DB" after you get the basic thing working. Initailizing the CSV DB is simple, it is a Comma Separate Value file. So this is a text file that can be generated from say an Excel spreadsheet or other ways. Your data has 5 fields, I think the user id is unique although that won't matter if it is not. This may seem like a "stupid question" on my part, but I am compelled to ask it because it could result in a vast simplification of the problem.
In Section
Seekers of Perl Wisdom
|
|