Name

Web::Components::Model - Base class for Web Component models

Synopsis

use Moo;

extends 'Web::Components::Model';

Description

Base class for Web Component models

Configuration and Environment

Defines the following attributes;

context_class

A required loadable class. The classname of the object created by get_context

An immutable string which defaults to nav. Key used to stash the Web::Components::Navigation

Subroutines/Methods

Defines the following methods;

error

Stash exception handler output to print an exception page. Also called by component loader if model dies

execute

Called by component loader for all model method calls

get_context

Creates and returns a new context object from the request

verify_form_post

Stash an exception if the CSRF token is bad

Diagnostics

None

Dependencies

Web::ComposableRequest

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Web-Components. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>

License and Copyright

Copyright (c) 2024 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE