The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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 Moose around method modifiers, it gets passed a coderef for the original method as its first argument. Unlike Moose, this may sometimes be undef (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

Refinements, Method::Lexical.

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.