| Froody::Repository - a repository of Froody::Method objects. |
Froody::Repository - a repository of Froody::Method objects.
use Froody::Repository; my $repository = Froody::Repository->new(); # methods for putting stuff in the repository $repository->register_implementation('Implementation::Package'); $repository->register_method($froody_method); $repository->register_errortype($froody_errortype); # methods for getting froody methods out my $method = $repository->get_method('name.of.method'); my @methods = $repository->get_methods; my @methods2 = $repository->get_methods('namespace.of.interest'); my @methods3 = $repository->get_methods(qr/delete/); # methods for getting froody errortype out my $errortype = $repository->get_errortype('name.of.errortype'); my @errortype = $repository->get_errortypes; my @errortype2 = $repository->get_errortypes('errortypes.of.interest'); my @errortype3 = $repository->get_errortypes(qr/delete/); my $errortype2 = $repository->get_closest_errortype('fragment.of.type');
the Froody::Repository manpage provides a central location to register and discover the Froody::Method manpage instances.
Register a method with the repository. You don't ever normally have
to call this method yourself, things like your Froody::Implementation
subclasses do it themselves from register_in_repository.
get_methods() || get_methods( $regex ) || get_methods( "foo.bar.*" )
Return all methods (as Froody::Method objects) if invoked with no arguments, or only the methods matching the query if invoked with an argument.
get_method($name)
Return a single method (as a Froody::Method object) matching $name exactly. Throws a Froody::Error of type "froody.invoke.nosuchmethod" if no method matching the $name is registered with this repository.
Register an errortype with the repository. You don't ever normally have
to call this method yourself, things like your Froody::Implementation
subclasses do it themselves from register_in_repository.
get_errortype($name)
Return a single errortype (as a Froody::ErrorType object) matching $name exactly. Throws a Froody::Error of type "froody.invoke.nosucherrortype" if no method matching the $name is registered with this repository.
get_errortypes() || get_errortypes( $regex ) || get_errortypes( "foo.bar.*" )
Return all errortypes (as Froody::ErrorTypes objects) if invoked with no arguments, or only the methods matching the query if invoked with an argument.
Registers all the methods associated with a given implementation and API in this repository.
Registers all the methods associated with a given API.
Loads a set of method and errortype structures into the repository
None known
We're using match_to_regex from Froody::Method, maybe that should
be refactored elsewhere
Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html
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.
Froody, the Froody::Method manpage
| Froody::Repository - a repository of Froody::Method objects. |