File: 02indexmap.t

package info (click to toggle)
libmoosex-arrayref-perl 0.005-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 172 kB
  • sloc: perl: 249; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (5)
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
use Test::More tests => 5;

{
	package Foo;
	use MooseX::ArrayRef; 
	has [qw/a c e/] => (is => 'ro');
}

{
	package Bar;
	use Moose::Role;
	has [qw/b/] => (is => 'ro');
}

{
	package Foo::Bar;
	use MooseX::ArrayRef; extends 'Foo'; with 'Bar';
	has [qw/d/] => (is => 'ro');
}

ok defined( Foo::Bar->meta->slot_index($_) ) for 'a'..'e';

note
	q(slot_to_index_map ),
	explain(Foo::Bar->meta->slot_to_index_map);