Benchmark-DKbench

 view release on metacpan or  search on metacpan

data/t/attributes/more_attr_delegation.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use Test::Fatal;

=pod

This tests the more complex
delegation cases and that they
do not fail at compile time.

=cut

{

    package ChildASuper;
    use Moose;

    sub child_a_super_method { "as" }

    package ChildA;
    use Moose;

    extends "ChildASuper";

    sub child_a_method_1 { "a1" }
    sub child_a_method_2 { Scalar::Util::blessed($_[0]) . " a2" }

    package ChildASub;
    use Moose;

    extends "ChildA";

    sub child_a_method_3 { "a3" }

    package ChildB;
    use Moose;

    sub child_b_method_1 { "b1" }
    sub child_b_method_2 { "b2" }
    sub child_b_method_3 { "b3" }

    package ChildC;
    use Moose;

    sub child_c_method_1 { "c1" }
    sub child_c_method_2 { "c2" }
    sub child_c_method_3_la { "c3" }
    sub child_c_method_4_la { "c4" }

    package ChildD;
    use Moose;

    sub child_d_method_1 { "d1" }
    sub child_d_method_2 { "d2" }

    package ChildE;
    # no Moose

    sub new { bless {}, shift }
    sub child_e_method_1 { "e1" }
    sub child_e_method_2 { "e2" }

    package ChildF;



( run in 0.831 second using v1.01-cache-2.11-cpan-54e63673c56 )