GUI.pm 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # ------------------------------------------------------------------------------
  2. # (C) Crown copyright Met Office. All rights reserved.
  3. # For further details please refer to the file COPYRIGHT.txt
  4. # which you should have received as part of this distribution.
  5. # ------------------------------------------------------------------------------
  6. use strict;
  7. use warnings;
  8. package Fcm::CLI::Invoker::GUI;
  9. use base qw{Fcm::CLI::Invoker};
  10. use Fcm::Util qw{run_command};
  11. ################################################################################
  12. # Invokes the sub-system
  13. sub invoke {
  14. my ($self) = @_;
  15. my ($target) = $self->get_arguments();
  16. run_command(['fcm_gui', ($target ? $target : ())], METHOD => 'exec');
  17. }
  18. 1;
  19. __END__
  20. =head1 NAME
  21. Fcm::CLI::GUIInvoker
  22. =head1 SYNOPSIS
  23. use Fcm::CLI::Invoker::GUI;
  24. $invoker = Fcm::CLI::Invoker::GUI->new({
  25. command => $command,
  26. options => \%options,
  27. arguments => $arguments,
  28. });
  29. $invoker->invoke($command, \%options, $target);
  30. =head1 DESCRIPTION
  31. This class extends L<Fcm::CLI::Invoker|Fcm::CLI::Invoker> an inherits all its
  32. methods. An object of this class is used to invoke the FCM GUI.
  33. =head1 METHODS
  34. See L<Fcm::CLI::Invoker|Fcm::CLI::Invoker> for a list of inherited methods.
  35. =over 4
  36. =item invoke()
  37. Invokes the FCM GUI. If a target is specified as argument, it is the initial
  38. working directory of the GUI.
  39. =back
  40. =head1 TO DO
  41. Unit tests.
  42. =head1 SEE ALSO
  43. L<Fcm::CLI::Invoker|Fcm::CLI::Invoker>,
  44. L<Fcm::CLI::Subcommand|Fcm::CLI::Subcommand>
  45. =head1 COPYRIGHT
  46. E<169> Crown copyright Met Office. All rights reserved.
  47. =cut