Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

cvs daemon in perl

by tallfred (Acolyte)
on May 10, 2002 at 18:37 UTC ( #165743=sourcecode: print w/ replies, xml ) Need Help??

Category: Networking Code
Author/Contact Info Frederick Dean <software@fdd.com>
Description:

I wrote a CVS server in perl which stores the repository in MySQL. I am working on a better access/privileges system, but some feedback would be useful. http://fdd.com/software/dcvs/

The code has a web page interface very similar to cvsweb.

Comment on cvs daemon in perl
Re: cvs daemon in perl
by mikeB (Friar) on May 10, 2002 at 19:28 UTC

    Haven't looked it over thouroghly yet, but the database code raised my eyebrow a bit. I wonder why you chose to build full sql statements with inline params and their associated quoting problems, rather than use DBI's parameters, which take are of those problems rather nicely?

    Part of the point of DBI is to stay independent of the underlying database. It would certainly be a plus if your server would run with, say PostgreSQL, or DB2, as well.

    In the 'make it pretty' department, I've taking to using q// to make the sql more readable, i.e.

    $statement_handle = $database_handle->prepare (q/ select col1, col2, col from table1 where col6 = ? /);

    ... or something along those lines.

    Keep on playing and learning! Gotta have some fun in life :)

      The SQL routines were lifted from Bugzilla and used out of laziness. Thanks. I will give your DBI suggestion a try.

      I figured if DCVS can work with the simple MySQL database, porting to the others would be pretty easy. My biggest MySQL lesson was that version 3.23 doesn't support mutli-table updates (i.e. a "where" clauses that mentions a second table). Eventually, I crafted a work around which used a temporary table.

Back to Code Catacombs

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-11-21 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (104 votes), past polls