OpenFrame::AppKit::Examples::NameForm - A simple form


OpenFrame-AppKit documentation Contained in the OpenFrame-AppKit distribution.

Index


Code Index:

NAME

Top

OpenFrame::AppKit::Examples::NameForm - A simple form

DESCRIPTION

Top

OpenFrame::AppKit::Examples::NameForm is a very small application that shows off subclassing OpenFrame::AppKit::Exmaples. It has two entry points, the default one (which resets the name) and form_filled (which save the name inside the object).

AUTHOR

Top

James Duncan <jduncan@fotango.com>

COPYRIGHT

Top


OpenFrame-AppKit documentation Contained in the OpenFrame-AppKit distribution.

package OpenFrame::AppKit::Examples::NameForm;

use strict;

use OpenFrame::AppKit::App;
use base qw ( OpenFrame::AppKit::App );

sub entry_points {
  return {
	  form_filled => [ qw(name) ]
	 }
}

sub default {
  my $self = shift;
  $self->{name} = undef;
}

sub form_filled {
  my $self = shift;
  my $args = $self->request->arguments();
  $self->{name} = $args->{name};
}

1;

__END__