NAME

Dancer::Plugin::SporeDefinitionControl

Dancer Plugin to control validity of route from a Spore configuration file

VERSION

Version 0.07

SYNOPSIS

Dancer required version : 1.3002

in your Dancer project, use this plugin and register :

package MyDancer::Server;

use Dancer::Plugin::SporeDefinitionControl;

check_spore_definition();

In your config file :

plugins:
  SporeDefinitionControl:
    spore_spec_path: path/to/route_config.yaml

The yaml path file can be relative (root project base) or absolute.

in your file path/to/route_config.yaml, put your SPORE config :

base_url: http://localhost:4500
version: 0.2
format:
  - json
  - xml
  - yml
methods:
  get_object:
    required_params:
      - id
      - name_object
    optional_params:
      - created_at
    path: /object/:id
    method: GET
  create_object:
    required_params:
      - name_object
    optional_params:
      - created_at
    path: /object/create
    method: POST
  update_object:
    required_params:
      - id
      - name_object
    optional_params:
      - created_at
    path: /object/:id
    method: PUT
  delete_object:
    required_params:
      - id
      - name_object
    optional_params:
      - created_at
    path: /object/:id
    method: DELETE

INITIALISATION

Load yaml config file

SUBROUTINES/METHODS

check_spore_definition

define spore validation to do on entered request

AUTHOR

Nicolas Oudard, <nicolas at oudard.org>

BUGS

Please report any bugs or feature requests to bug-dancer-plugin-sporedefinitioncontrol at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dancer-Plugin-SporeDefinitionControl. 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 Dancer::Plugin::SporeDefinitionControl

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2010 Nicolas Oudard.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.