NAME
Refinements::Package - a package of refinements
DESCRIPTION
Refinements will make your package inherit from this package. This package itself is a subclass of Method::Lexical.
Methods
The following class methods are defined:
add_refinement($fqname, $coderef)
-
Adds a refinement to your package.
$fqname
should be a fully-qualified sub name; the method which you wish to override; such as"LWP::UserAgent::request"
or"UNIVERSAL::DOES"
.$coderef
is the new implementation for the method. Note that, like Moosearound
method modifiers, it gets passed a coderef for the original method as its first argument. Unlike Moose, this may sometimes beundef
(if your refinement is defining a new method which does not already exist). has_refinement($fqname)
-
Returns a boolean indicating whether the package has a refinement.
get_refinement($fqname)
-
Returns the refinement coderef for the name.
get_refinement_names()
-
Returns the fully-qualified names of all refinements in the package, in no particular order.
import()
-
The glue for Method::Lexical.
BUGS
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Refinements.
SEE ALSO
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.