use LaTeX::TikZ::Point;
use Any::Moose;
+use Any::Moose 'Util::TypeConstraints';
with 'LaTeX::TikZ::Set::Op';
has 'point' => (
is => 'ro',
- does => 'LaTeX::TikZ::Point::Autocoerce',
+ isa => 'LaTeX::TikZ::Point::Autocoerce',
required => 1,
coerce => 1,
);
+coerce 'LaTeX::TikZ::Set::Point'
+ => from 'Any'
+ => via { __PACKAGE__->new(point => $_) };
+
sub path {
my ($set, $tikz) = @_;
use LaTeX::TikZ::Interface point => sub {
shift;
- __PACKAGE__->new(point => $_[0]);
+ __PACKAGE__->new(point => @_ > 1 ? \@_ : $_[0] );
};
__PACKAGE__->meta->make_immutable;