X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FPoint.pm;h=5bf292b10ca11bffccb4c1b26c90af74f803a5e2;hp=3b43c99d455e4fd5b8bd07ac44e367fbe1be4e18;hb=af7d6a5aef3bf5fec0c187b3a13a14adc88251fd;hpb=92147217516a40b35ca00c8e08939e8aa5478426 diff --git a/lib/LaTeX/TikZ/Set/Point.pm b/lib/LaTeX/TikZ/Set/Point.pm index 3b43c99..5bf292b 100644 --- a/lib/LaTeX/TikZ/Set/Point.pm +++ b/lib/LaTeX/TikZ/Set/Point.pm @@ -17,6 +17,7 @@ our $VERSION = '0.01'; use LaTeX::TikZ::Point; +use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; use Any::Moose; @@ -48,14 +49,16 @@ sub path { '(' . $tikz->len($p->x) . ',' . $tikz->len($p->y) . ')'; } -use LaTeX::TikZ::Interface point => sub { - shift; +LaTeX::TikZ::Interface->register( + point => sub { + shift; - my $point = @_ == 0 ? 0 - : @_ == 1 ? $_[0] - : \@_; - __PACKAGE__->new(point => $point); -}; + my $point = @_ == 0 ? 0 + : @_ == 1 ? $_[0] + : \@_; + __PACKAGE__->new(point => $point); + }, +); LaTeX::TikZ::Functor->default_rule( (__PACKAGE__) => sub {