X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FUnion.pm;h=b13eb473c74000d2244c9cf9f4914d80163e63cb;hb=58dbdba6c44235e491e03288cb9a4ad4223b2cdd;hp=2648d3d77223810556025bdb637b234fca8ff056;hpb=b8f42942311854cb0ef8a3e34c0145846639cd2e;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set/Union.pm b/lib/LaTeX/TikZ/Set/Union.pm index 2648d3d..b13eb47 100644 --- a/lib/LaTeX/TikZ/Set/Union.pm +++ b/lib/LaTeX/TikZ/Set/Union.pm @@ -20,17 +20,17 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS -This class consumes the L and L roles, and as such implements the L and L methods. +This class consumes the L and L roles, and as such implements the L, L and L methods. =cut with qw< LaTeX::TikZ::Set::Path - LaTeX::TikZ::Set::Mutable + LaTeX::TikZ::Set::Container >; =head1 ATTRIBUTES @@ -78,10 +78,41 @@ sub path { join ' ', map $_->path(@_), $set->kids; } +=head2 C + +=cut + +sub begin { + my $set = shift; + + my @kids = $set->kids; + return undef unless @kids; + + $kids[0]->begin; +} + +=head2 C + +=cut + +sub end { + my $set = shift; + + my @kids = $set->kids; + return undef unless @kids; + + $kids[-1]->end; +} + LaTeX::TikZ::Interface->register( union => sub { shift; + __PACKAGE__->new(kids => \@_); + }, + path => sub { + shift; + __PACKAGE__->new(kids => \@_); }, ); @@ -97,7 +128,7 @@ __PACKAGE__->meta->make_immutable; =head1 SEE ALSO -L, L, L. +L, L, L. =head1 AUTHOR