Rhesa Rozendaal > CGI-Application-Plugin-RunmodeDeclare-0.10 > CGI::Application::Plugin::RunmodeDeclare

Download:
CGI-Application-Plugin-RunmodeDeclare-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.10   Source  

NAME ^

CGI::Application::Plugin::RunmodeDeclare - Declare runmodes with keywords

VERSION ^

version 0.10

SYNOPSIS ^

    package My::CgiApp;

    use base 'CGI::Application';
    use CGI::Application::Plugin::RunmodeDeclare;

    startmode hello { "Hello!" }

    runmode world($name) {
        return $self->hello
        . ', '
        . $name || "World!";
    }

    errormode oops($c: $exception) {
        return "Something went wrong at "
        . $c->get_current_runmode
        . ". Exception: $exception";
    }

DESCRIPTION ^

This module allows you to declare run modes with a simple keyword. It provides the same features as Method::Signatures::Simple.

It respects inheritance: run modes defined in the superclass are also available in the subclass.

Beyond automatically registering the run mode, and providing $self, it also optionally pulls named parameters from $self->query->param or $self->param.

EXPORT ^

AUTHOR ^

Rhesa Rozendaal, <rhesa at cpan.org>

DIAGNOSTICS ^

BUGS ^

Please report any bugs or feature requests to bug-cgi-application-plugin-runmodedeclare at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-RunmodeDeclare. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc CGI::Application::Plugin::RunmodeDeclare

You can also look for information at:

ACKNOWLEDGEMENTS ^

Matt S. Trout for Devel::Declare, and Michael G. Schwern for providing the inspiration with Method::Signatures.

COPYRIGHT & LICENSE ^

Copyright 2008 Rhesa Rozendaal, all rights reserved.

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

syntax highlighting: