- # Copied from old Dev-Editor (great idea)
-
- my %dispatch = ('show' => \&exec_show,
- 'beginedit' => \&exec_beginedit,
- 'canceledit' => \&exec_unlock,
- 'endedit' => \&exec_endedit,
- 'mkdir' => \&exec_mkdir,
- 'mkfile' => \&exec_mkfile,
- 'workwithfile' => \&exec_workwithfile,
- 'copy' => \&exec_copy,
- 'rename' => \&exec_rename,
- 'remove' => \&exec_remove,
- 'unlock' => \&exec_unlock
- );
-
- # Create a File::UseList object and load the list
-
- my $uselist = new File::UseList(listfile => $config{'uselist_file'},
- lockfile => $config{'lock_file'},
- timeout => $config{'lock_timeout'});
-
- $uselist->lock or abort("Locking of $config{'uselist_file'} failed. Try it again in a moment. If the problem persists, ask someone to recreate the lock file ($config{'lock_file'}).");
- $uselist->load;
-
- # Create a hash with data submitted by user
- # (the CGI and the File::UseList object will also be included)
-
- my %data = (physical => $physical,
- virtual => $virtual,
- new_physical => $new_physical,
- new_virtual => $new_virtual,
- uselist => $uselist,
- cgi => $cgi);
-
- unless($dispatch{$command})