The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Jojo::Role - Role::Tiny + lexical "with"

VERSION

version 0.1.0

SYNOPSIS

  package Some::Role {
    use Jojo::Role;

    sub foo {...}
    sub bar {...}
    around baz => sub {...};
  }

  package Some::Class {
    use Jojo::Role -with;
    with 'Some::Role';

    # bar gets imported, but not foo
    sub foo {...}

    # baz is wrapped in the around modifier by Class::Method::Modifiers
    sub baz {...}
  }

DESCRIPTION

Jojo::Role works like Role::Tiny but with, require, before, after and around are imported as lexical subroutines.

This is a companion to Mojo::Bass.

SEE ALSO

Role::Tiny

Mojo::Bass.

AUTHOR

Adriano Ferreira <ferreira@cpan.org>

CONTRIBUTOR

Adriano Ferreira <a.r.ferreira@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Adriano Ferreira.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.