]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/blobdiff - lib/LaTeX/TikZ/Set/Union.pm
This is 0.03
[perl/modules/LaTeX-TikZ.git] / lib / LaTeX / TikZ / Set / Union.pm
index 228a6ff455a1bc5a404896abecb359bef9886056..af0051828891852fe6c91bd814b70cc22da3331e 100644 (file)
@@ -9,18 +9,18 @@ LaTeX::TikZ::Set::Union - A set object representing a path formed by the reunion
 
 =head1 VERSION
 
-Version 0.02
+Version 0.03
 
 =cut
 
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 
 use LaTeX::TikZ::Interface;
 use LaTeX::TikZ::Functor;
 
 use LaTeX::TikZ::Tools;
 
-use Any::Moose;
+use Mouse;
 
 =head1 RELATIONSHIPS
 
@@ -78,10 +78,41 @@ sub path {
  join ' ', map $_->path(@_), $set->kids;
 }
 
+=head2 C<begin>
+
+=cut
+
+sub begin {
+ my $set = shift;
+
+ my @kids = $set->kids;
+ return undef unless @kids;
+
+ $kids[0]->begin;
+}
+
+=head2 C<end>
+
+=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 => \@_);
  },
 );
@@ -118,7 +149,7 @@ You can find documentation for this module with the perldoc command.
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2010 Vincent Pit, all rights reserved.
+Copyright 2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.