File: MS_MXD_Role.pm

package info (click to toggle)
libmethod-signatures-perl 20170211-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 672 kB
  • sloc: perl: 3,860; makefile: 2
file content (33 lines) | stat: -r--r--r-- 798 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# used by t/mxd-role.t

use MooseX::Declare;
use Method::Signatures::Modifiers;


# Unlike classes, roles don't need to actually _have_ to have the methods they're modifying.  This
# particular test file is less about making sure we're properly substituting and more about making
# sure we're not blowing up.  Our original version of MSM::code_for was a bit too agressive in its
# error checking and disallowed some role method modifiers that it shouldn't have.
#
# No need to test 'augment' because that isn't allowed in roles.
role Foo
{
    # attribute with modifiers
    has foo => ( is => 'ro' );

    before foo () {}
    after foo () {}

    # "naked" modifiers

    before test_before () {}

    around test_around () {}

    after test_after () {}

    override test_override () {}
}


1;