more tying to convert my methods to real objects
[gitmo/MooseX-Types-Structured.git] / lib / MooseX / Meta / TypeConstraint / Structured / Positionable.pm
CommitLineData
bfef1b30 1package MooseX::Meta::TypeConstraint::Structured::Positionable;
2
3use strict;
4use warnings;
5
6use metaclass;
7
8use base 'Moose::Meta::TypeConstraint::Parameterizable';
9use Moose::Util::TypeConstraints ();
10use MooseX::Meta::TypeConstraint::Structured::Positional;
11
12
13sub parse_parameter_str {
14 my ($self, @type_strs) = @_; warn '.........................';
15 return map {Moose::Util::TypeConstraints::find_or_create_isa_type_constraint($_)} @type_strs;
16}
17
18sub parameterize {
19 my ($self, @contained_tcs) = @_; warn ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,';
20 my $tc_name = $self->name .'['. join(', ', map {$_->name} @contained_tcs) .']';
21
22 return MooseX::Meta::TypeConstraint::Structured::Positional->new(
23 name => $tc_name,
24 parent => find_type_constraint('ArrayRef'),
25 package_defined_in => __PACKAGE__,
26 signature => \@contained_tcs,
27 );
28
29}
30
31
321;