NAME
Attribute::Overload - Attribute that makes overloading easier
SYNOPSIS
use Attribute::Overload;
sub add : Overload(+) { ... }
DESCRIPTION
The Overload
attribute, when used on a subroutine, declares that subroutine as handler in the current package for the operation(s) indicated by the attribute options. Thus it frees you from the implementation details of how to declare overloads and keeps the definitions where they belong, with the operation handlers.
For details of which operations can be overloaded and what the overloading function gets passed see the overload
manpage.
Note that you can't overload constants this way, since this has to happen during BEGIN time, but attributes are only evaluated at CHECK time (at least as far as Attribute::Handlers
is concerned).
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to bug-attribute-overload@rt.cpan.org
, or through the web interface at http://rt.cpan.org.
INSTALLATION
See perlmodinstall for information and options on installing Perl modules.
AVAILABILITY
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>.
AUTHOR
Marcel Grünauer, <marcel@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2001-2007 by Marcel Grünauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.