artist has asked for the wisdom of the Perl Monks concerning the following question:

Purpose: Show different version of the application on the fly.

I am developing a web application using emacs. Emacs offers version control via RCS. I create snapshots often. When I like to review the older version,I have to save all the current files and I have to retrieve the snapshot(with vc-retrieve-snapshot) manually.
I like to pass the snapshot name from the webfront end, so that it can saved all the files (if not saved) and display the desired snapshot of application.

How do I do with Perl?, Is my approach correct?

Thanks for the guidence.
artist.

  • Comment on Dynamically display different versions.

Replies are listed 'Best First'.
Re: Dynamically display different versions.
by dash2 (Hermit) on May 27, 2004 at 18:13 UTC
    Perhaps the simplest solution might be to use cvs (which is built on top of rcs) and use webcvs, which probably does what you want already.
    A massive flamewar beneath your chosen depth has not been shown here
Re: Dynamically display different versions.
by perrin (Chancellor) on May 27, 2004 at 16:59 UTC
    You can do this by writing a CGI program that will accept arguments for the file name and the version to be viewed, check out the right one from RCS, and send it back to the client. If you want to get fancy, you can have a configuration page where a user chooses the version to be viewed. Then you set that version in a cookie so that you will know the version they want without adding it to the URL. By mapping a set of URLs using apache's Location directive, you can have anything under /rcs/* go to your CGI program which will then look at PATH_INFO to determine which file to show and the cookie to determine which version. Of course all of this can be done with mod_perl as well.