renamed test
[gitmo/MooseX-Dependent.git] / t / 01-basic.t
CommitLineData
a018b5bb 1use Test::More tests=>5;
2use MooseX::Types::Structured qw(Tuple slurpy);
3use MooseX::Types qw(Str Object);
4
5use_ok 'MooseX::Meta::TypeConstraint::Structured';
6use_ok 'Moose::Util::TypeConstraints';
7
8ok my $int = find_type_constraint('Int') => 'Got Int';
9ok my $str = find_type_constraint('Str') => 'Got Str';
10ok my $obj = find_type_constraint('Object') => 'Got Object';
11ok my $arrayref = find_type_constraint('ArrayRef') => 'Got ArrayRef';
12
13my $a = [1,2,3,4];
14
15
16package Dependent;
17
18use overload(
19 '&{}' => sub {
20 warn 'sdfsdfsdfsdfsdf';
21 return sub {};
22 },
23);
24
25sub new {
26 my $class = shift @_;
27 return bless {a=>1}, $class;
28}
29
301;
31
32my $dependent = Dependent->new($int);
33
34$dependent->();
35