File: custom_attr_meta_as_role.t

package info (click to toggle)
libmoose-perl 2.2207-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,416 kB
  • sloc: perl: 21,345; ansic: 291; makefile: 10
file content (20 lines) | stat: -rw-r--r-- 432 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
use strict;
use warnings;

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

is( exception {
    package MooseX::Attribute::Test;
    use Moose::Role;
}, undef, 'creating custom attribute "metarole" is okay' );

is( exception {
    package Moose::Meta::Attribute::Custom::Test;
    use Moose;

    extends 'Moose::Meta::Attribute';
    with 'MooseX::Attribute::Test';
}, undef, 'custom attribute metaclass extending role is okay' );

done_testing;