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');
Froody::Repository provides a central location to register and discover Froody::Method 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.
register_in_repository
Return all methods (as Froody::Method objects) if invoked with no arguments, or only the methods matching the query if invoked with an argument.
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.
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.
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
match_to_regex
Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody
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, Froody::Method
To install Froody, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Froody
CPAN shell
perl -MCPAN -e shell install Froody
For more information on module installation, please visit the detailed CPAN module installation guide.