Toby Inkster > Class-Method-ModifiersX-Override-0.001 > Role::TinyX::Override

Download:
Class-Method-ModifiersX-Override-0.001.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.001   Source   Latest Release: Class-Method-ModifiersX-Override-0.002

NAME ^

Role::TinyX::Override - adds "override method => sub {...}" support to Role::Tiny

SYNOPSIS ^

   use v5.14;
   use strict;
   use Test::More;
   
   package Foo {
      sub new { bless []=> shift }
      sub foo { return "foo" }
   }
   
   package Bar {
      use Role::Tiny;
      use Role::TinyX::Override;
      override foo => sub {
         return uc super;
      };
   }
   
   package Foo::Bar {
      BEGIN { our @ISA = 'Foo' };
      use Role::Tiny::With;
      with qw(Bar);
   }
   
   is( Foo::Bar->new->foo, "FOO" );
   done_testing();

DESCRIPTION ^

Role::TinyX::Override extends Role::Tiny with the override method modifier, allowing you to use this Moose syntactic sugar for overriding superclass methods in Role::Tiny roles.

See Class::Method::ModifiersX::Override for further details.

SEE ALSO ^

Role::Tiny, Class::Method::ModifiersX::Override.

AUTHOR ^

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE ^

This software is copyright (c) 2012 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.

syntax highlighting: