PET::ActionMapper::Single

PET::ActionMapper::Single

The simplest PET::ActionMapper subclass.

It assumes that you have ONE API, and all of your .pet files are mapped to that one API.

For example: http://foobar.com/foo.pet is mapped to YourClass->ACTION_foo()

The methodname is prefixed with config parameter “actionmapper/methodcallprefix”, while slashes (/) in your URI are substituted by “actionmapper/methodcallprefix”.

For example: if you set “slashsubst” to “__” (default) and “methodcallprefix” to “ACTION_”, then the URL http://foo.com/bar/foobar.pet will call YourClass->ACTION_bar__foobar()

(Note: YourClass is actually $YourClass, an object created from your YourClass defined by “actionmappar/apiclass”).

Functions

resolveCall ($uri)

sub resolveCall

See: PET::ActionMapper

Class to map URI-s to ACTION-s.
sub resolveCall
See: PET::ActionMapper
Close