]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Set/Point.pm
Fix the autocoercing code with recent versions of Moose
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Set / Point.pm
index ff861b0c0aac61dee84bbc9de8e68810c6821445..6e78e66a69f6d2b542e2c4992992738491428063 100644 (file)
@@ -25,11 +25,11 @@ use Any::Moose 'Util::TypeConstraints';
 
 =head1 RELATIONSHIPS
 
-This class consumes the L<LaTeX::TikZ::Set::Op> role, and as such implements the L</path> method.
+This class consumes the L<LaTeX::TikZ::Set::Path> role, and as such implements the L</path> method.
 
 =cut
 
-with 'LaTeX::TikZ::Set::Op';
+with 'LaTeX::TikZ::Set::Path';
 
 =head1 ATTRIBUTES
 
@@ -44,7 +44,7 @@ has 'point' => (
  isa      => 'LaTeX::TikZ::Point::Autocoerce',
  required => 1,
  coerce   => 1,
- handles  => [ qw/x y/ ],
+ handles  => [ qw<x y> ],
 );
 
 =head2 C<label>
@@ -114,6 +114,18 @@ sub path {
  $path;
 }
 
+=head2 C<begin>
+
+=cut
+
+sub begin { $_[0]->point }
+
+=head2 C<end>
+
+=cut
+
+sub end { $_[0]->point }
+
 LaTeX::TikZ::Interface->register(
  point => sub {
   shift;
@@ -142,11 +154,11 @@ LaTeX::TikZ::Functor->default_rule(
  }
 );
 
-__PACKAGE__->meta->make_immutable;
+__PACKAGE__->meta->make_immutable if any_moose() ne 'Moose';
 
 =head1 SEE ALSO
 
-L<LaTeX::TikZ>, L<LaTeX::TikZ::Set::Op>.
+L<LaTeX::TikZ>, L<LaTeX::TikZ::Set::Path>.
 
 =head1 AUTHOR