MooseX::Role::WithOverloading(3pm)

MooseX::Role::WithOverloading3pm

(deprecated) roles which support overloading

Usage

    package MyRole;
    use MooseX::Role::WithOverloading;
    use overload
        q{""}    => 'as_string',
        fallback => 1;
    has message => (
        is       => 'rw',
        isa      => 'Str',
    );
    sub as_string { shift->message }
    package MyClass;
    use Moose;
    use namespace::autoclean;
    with 'MyRole';
    package main;
    my $i = MyClass->new( message => 'foobar' );
    print $i; # Prints 'foobar'

Version

version 0.17

Overview

MooseX::Role::WithOverloading allows you to write a Moose::Role which defines overloaded operators and allows those overload methods to be composed into the classes/roles/instances it's compiled to, where plain Moose::Roles would lose the overloading.

Starting with Moose version 2.1300, this module is no longer necessary, as the functionality is available already. In that case, "use MooseX::Role::WithOverloading" behaves identically to "use Moose::Role".

Deprecation notice

This module is marked as deprecated, as starting with Moose version 2.1300, the functionality provided here is now built-in to Moose. You only need to use this module if you are using an older Moose (but please upgrade!).

Support

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Role-WithOverloading> (or [email protected] <mailto:[email protected]>).

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>.

There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose.

Contributors

•

Karen Etheridge <[email protected]>

•

Dave Rolsky <[email protected]>

•

Jesse Luehrs <[email protected]>

•

Tomas Doran (t0m) <[email protected]>

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Authors

•

Florian Ragwitz <[email protected]>

•

Tomas Doran <[email protected]>

From libmoosex-role-withoverloading-perl 0.17-3+b4 in Debian 13 (Trixie). Parsed by carta from the page's man source.