scms.pl 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. print <<EOH;
  59. SCMS - Service Contract Management System
  60. MANAGE:
  61. This subcommand is used to log management actions.
  62. INVOCATION
  63. scms manage user classification
  64. Where user is the name of manager and classification is the type of
  65. management done.
  66. EOH
  67. } elsif ($ARGV[0] eq 'list') {
  68. print <<EOH;
  69. EOH
  70. } elsif ($ARGV[0] eq 'log') {
  71. } elsif ($ARGV[0] eq 'cdata') {
  72. } elsif ($ARGV[0] eq 'crenewal') {
  73. } elsif ($ARGV[0] eq 'cmanage') {
  74. } elsif ($ARGV[0] eq 'status') {
  75. }
  76. }
  77. sub managesys {
  78. }
  79. sub list {
  80. }
  81. sub logger {
  82. }
  83. sub contractdata {
  84. }
  85. sub contractrenewal {
  86. }
  87. sub contractmanage {
  88. }
  89. sub status {
  90. }
  91. __END__