NAME
Froody::API - Base class for API definition
SYNOPSIS
package Project::API;
use base 'Froody::API';
# return all things that this API should register with a repository
sub load { @stuff }
DESCRIPTION
This is the base class for classes that define Froody::Method objects, Froody::ErrorType objects and all other objects that you register in a repository.
You really shouldn't have to deal with this unless you're creating your Froody::Methods by hand. In most cases you'll use the Froody::API::XML subclass of this.
METHODS
- load()
-
Called by
define
. Subclass must override this method to return a list of objects that we should register with the API some how. Currently we expect this list to contain Froody::Method or Froody::ErrorType subclasses, and then everything else is ignored.NOTE:
load()
should return a new instance of the objects each time the method is called rather than the same one. This is to prevent bad things happening if you have more than one repository and they're using different implementations etc.
BUGS
The current implementation of get_methods
and get_errortypes
doesn't do anything clever, and therefore calls load
twice. We should refactor so this isn't the case.
Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody
AUTHOR
Copyright Fotango 2005. All rights reserved.
Please see the main Froody documentation for details of who has worked on this project.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.