-A boolean that indicates whether the path is closed or not.
-
-=cut
-
-has 'closed' => (
- is => 'ro',
- isa => 'Bool',
- default => 0,
-);
-
-=head1 METHODS
-
-=head2 C<path>
-
-=cut
-
-sub path {
- my $set = shift;
-
- join ' -- ', map($_->path(@_), $set->points),
- ($set->closed ? 'cycle' : ());
-}
-
-=head2 C<begin>
-
-=cut
-
-sub begin {
- my $set = shift;
-
- my @points = $set->points;
- return undef unless @points;
-
- $points[0]->begin;
-}
-
-=head2 C<end>
-
-=cut
-
-sub end {
- my $set = shift;
-
- my @points = $set->points;
- return undef unless @points;
-
- $points[-1]->end;
-}