File::VMSVersionsPerl extension for opening files in a directory with VMS like versioning | |
Download |
File::VMSVersions Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Thomas Kratz
- Publisher web site:
- http://search.cpan.org/~tomk/
File::VMSVersions Tags
File::VMSVersions Description
Perl extension for opening files in a directory with VMS like versioning File::VMSVersions is a Perl module developed for maintaining automatic versioning of files in a directory. When you are using the module's routines for opening files, it will keep a configurable amount of old versions. The versions will be identified by a number that is added at the end of the filename after a semicolon (i. e. 'myfile.dat;7').The configured options for a directory are saved in the file '.vcntl'. They are read each time the open method is called and written when the new constructor or the config method are called with according options.'.vcntl' consists of only one line with limit and mode separated by an '#'. For example: 20#days 10#versionsIt is ok to edit '.vcntl' manuallySYNOPSIS use File::VMSVersions; my $vdir = File::VMSVersions->new( -name => "./mydir", -mode => 'versions', -limit => 3, ); foreach my $i (1..6) { my($fh, $fn) = $vdir->open('bla.dat', '>'); die $fn unless $fh; print $fh "file number $i\n"; print "created $fn\n"; $fh->close; }Now you should have the following files in ./mydir: .vcntl bla.dat;lck bla.dat;4 bla.dat;5 bla.dat;6 Requirements: · Perl
File::VMSVersions Related Software