scms.pl 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #!/usr/bin/perl
  2. ################################################################################
  3. # SCMS, Service Contract Management System #
  4. ################################################################################
  5. # Copyright Sam Flint, 2012, Licenesed under the GNU GPL v3 or later. #
  6. # Documentation available at http://flintfam.org/wiki/ #
  7. ################################################################################
  8. use YAML qw/LoadFile DumpFile/;
  9. $cmd = shift @ARGV;
  10. ###############################
  11. # command switch #
  12. ###############################
  13. if($cmd eq "help") {
  14. dohelp();
  15. }
  16. elsif($cmd eq "manage") {
  17. managesys();
  18. }
  19. elsif($cmd eq "list") {
  20. list();
  21. }
  22. elsif($cmd eq "log") {
  23. logger();
  24. }
  25. elsif($cmd eq "cdata") {
  26. contractdata();
  27. }
  28. elsif($cmd eq "crenewal") {
  29. contractrenewal();
  30. }
  31. elsif($cmd eq "cmanage") {
  32. contractmanage();
  33. }
  34. elsif($cmd eq "status") {
  35. status();
  36. }
  37. else {
  38. print "$cmd: Invalid command, try help or ihelp.\n\n";
  39. }
  40. ###############################
  41. # subs #
  42. ###############################
  43. sub dohelp {
  44. if ($ARGV[0] eq '') {
  45. print <<EOH;
  46. SCMS - Service Contract Management System
  47. Commands:
  48. help Displays Help
  49. manage Management Log
  50. list List data
  51. log List management actions
  52. cdata Display contract data
  53. crenewal Run Contract Renewal routines
  54. cmanage Run Contract Management
  55. status View Contract Status
  56. EOH
  57. } elsif ($ARGV[0] eq 'manage') {
  58. } elsif ($ARGV[0] eq 'list') {
  59. } elsif ($ARGV[0] eq 'log') {
  60. } elsif ($ARGV[0] eq 'cdata') {
  61. } elsif ($ARGV[0] eq 'crenewal') {
  62. } elsif ($ARGV[0] eq 'cmanage') {
  63. } elsif ($ARGV[0] eq 'status') {
  64. }
  65. }
  66. sub managesys {
  67. }
  68. sub list {
  69. }
  70. sub logger {
  71. }
  72. sub contractdata {
  73. }
  74. sub contractrenewal {
  75. }
  76. sub contractmanage {
  77. }
  78. sub status {
  79. }
  80. __END__