RunApp::Control - Control class for RunApp


RunApp documentation Contained in the RunApp distribution.

Index


Code Index:

NAME

Top

RunApp::Control - Control class for RunApp

SYNOPSIS

Top

 use base 'RunApp::Control'

DESCRIPTION

Top

The class is not intended for direct use. It provides a AUTOLOAD function that delegates calls to the dispatch method.

SEE ALSO

Top

RunApp

AUTHORS

Top

Chia-liang Kao <clkao@clkao.org>

Refactored from works by Leon Brocard <acme@astray.com> and Tom Insam <tinsam@fotango.com>.

COPYRIGHT

Top


RunApp documentation Contained in the RunApp distribution.

package RunApp::Control;
use strict;
use base qw(RunApp::Base);

AUTOLOAD {
  our $AUTOLOAD;
  my ($cmd) = $AUTOLOAD =~ m/:?(\w+)$/;
  return unless $cmd =~ m/[a-z]/;
  my $self = shift;
  $self->dispatch ($cmd, @_);
}

# abstract
sub dispatch {
    die "This must be implemented by child.";
}

1;