From: Vincent Pit Date: Sun, 1 Aug 2010 22:10:24 +0000 (+0200) Subject: Rename LT::Mod->cover to ->covers X-Git-Tag: v0.02~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=commitdiff_plain;h=37b2cca5547d02b2a751a26f9949d492b5002c2e Rename LT::Mod->cover to ->covers --- diff --git a/lib/LaTeX/TikZ/Mod.pm b/lib/LaTeX/TikZ/Mod.pm index de90607..5c90738 100644 --- a/lib/LaTeX/TikZ/Mod.pm +++ b/lib/LaTeX/TikZ/Mod.pm @@ -35,11 +35,11 @@ These methods are required by the interface : C Returns an identifier for the mod object. -It is used to gather mods together when calling C on them. +It is used to gather mods together when calling C on them. =item * -C +C Returns true if and only if the effects of the mod C<$mod> are already ensured by the current mod object, in which case no actual TikZ code will be emitted for C<$mod>. Both mod objects are guaranteed to have the same C. @@ -62,7 +62,7 @@ Returns the TikZ code that activates the current mod as a string formatted by th requires qw( tag - cover + covers declare apply ); diff --git a/lib/LaTeX/TikZ/Mod/Clip.pm b/lib/LaTeX/TikZ/Mod/Clip.pm index f9d9022..b61022f 100644 --- a/lib/LaTeX/TikZ/Mod/Clip.pm +++ b/lib/LaTeX/TikZ/Mod/Clip.pm @@ -29,7 +29,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -63,7 +63,7 @@ my $default_formatter = LaTeX::TikZ::Formatter->new( sub tag { ref $_[0] } -=head2 C +=head2 C =cut @@ -140,7 +140,7 @@ my @handlers = ( [ 'LaTeX::TikZ::Set::Circle' => $cover_circle ], ); -sub cover { +sub covers { my ($old, $new) = map $_->clip, @_[0, 1]; for (@handlers) { diff --git a/lib/LaTeX/TikZ/Mod/Color.pm b/lib/LaTeX/TikZ/Mod/Color.pm index 48e67db..73676b8 100644 --- a/lib/LaTeX/TikZ/Mod/Color.pm +++ b/lib/LaTeX/TikZ/Mod/Color.pm @@ -21,7 +21,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -47,11 +47,11 @@ has 'color' => ( sub tag { ref $_[0] } -=head2 C +=head2 C =cut -sub cover { $_[0]->color eq $_[1]->color } +sub covers { $_[0]->color eq $_[1]->color } =head2 C diff --git a/lib/LaTeX/TikZ/Mod/Fill.pm b/lib/LaTeX/TikZ/Mod/Fill.pm index 61aef2b..cbf3369 100644 --- a/lib/LaTeX/TikZ/Mod/Fill.pm +++ b/lib/LaTeX/TikZ/Mod/Fill.pm @@ -21,7 +21,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -47,11 +47,11 @@ has 'color' => ( sub tag { ref $_[0] } -=head2 C +=head2 C =cut -sub cover { $_[0]->color eq $_[1]->color } +sub covers { $_[0]->color eq $_[1]->color } =head2 C diff --git a/lib/LaTeX/TikZ/Mod/Layer.pm b/lib/LaTeX/TikZ/Mod/Layer.pm index fda3d59..271e0ee 100644 --- a/lib/LaTeX/TikZ/Mod/Layer.pm +++ b/lib/LaTeX/TikZ/Mod/Layer.pm @@ -27,7 +27,7 @@ use Any::Moose 'Util::TypeConstraints'; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -139,11 +139,11 @@ sub tag { ref($self) . '/' . $self->name; } -=head2 C +=head2 C =cut -sub cover { $_[0]->name eq $_[1]->name } +sub covers { $_[0]->name eq $_[1]->name } =head2 C diff --git a/lib/LaTeX/TikZ/Mod/Pattern.pm b/lib/LaTeX/TikZ/Mod/Pattern.pm index c3ed9c1..bcbadad 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern.pm @@ -21,7 +21,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -74,11 +74,11 @@ my %handlers = ( sub tag { ref $_[0] } -=head2 C +=head2 C =cut -sub cover { 0 } +sub covers { 0 } =head2 C diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm index 3698a2f..fbecf97 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm @@ -22,7 +22,7 @@ use Any::Moose 'Util::TypeConstraints'; =head1 RELATIONSHIPS -This class inherits the L class and its L, L, L and L methods. +This class inherits the L class and its L, L, L and L methods. =cut diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm index 10a63f4..c2272fe 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm @@ -24,7 +24,7 @@ use Any::Moose 'Util::TypeConstraints'; =head1 RELATIONSHIPS -This class inherits the L class and its L, L, L and L methods. +This class inherits the L class and its L, L, L and L methods. =cut @@ -147,11 +147,11 @@ around 'BUILDARGS' => sub { sub tag { join '/', ref $_[0], $_[0]->direction } -=head2 C +=head2 C =cut -sub cover { +sub covers { my ($this, $other) = @_; LaTeX::TikZ::Tools::numeq($this->line_width, $other->line_width) or return 0; diff --git a/lib/LaTeX/TikZ/Mod/Raw.pm b/lib/LaTeX/TikZ/Mod/Raw.pm index e674610..258ee75 100644 --- a/lib/LaTeX/TikZ/Mod/Raw.pm +++ b/lib/LaTeX/TikZ/Mod/Raw.pm @@ -21,7 +21,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -51,11 +51,11 @@ sub tag { ref($self) . '/' . $self->content; } -=head2 C +=head2 C =cut -sub cover { 0 } +sub covers { 0 } =head2 C diff --git a/lib/LaTeX/TikZ/Mod/Width.pm b/lib/LaTeX/TikZ/Mod/Width.pm index 58a8804..b6086e3 100644 --- a/lib/LaTeX/TikZ/Mod/Width.pm +++ b/lib/LaTeX/TikZ/Mod/Width.pm @@ -23,7 +23,7 @@ use Any::Moose; =head1 RELATIONSHIPS -This class consumes the L role, and as such implements the L, L, L and L methods. +This class consumes the L role, and as such implements the L, L, L and L methods. =cut @@ -49,11 +49,11 @@ has 'width' => ( sub tag { ref $_[0] } -=head2 C +=head2 C =cut -sub cover { LaTeX::TikZ::Tools::numeq($_[0]->width, $_[1]->width) } +sub covers { LaTeX::TikZ::Tools::numeq($_[0]->width, $_[1]->width) } =head2 C diff --git a/lib/LaTeX/TikZ/Set.pm b/lib/LaTeX/TikZ/Set.pm index 5a88821..ab66433 100644 --- a/lib/LaTeX/TikZ/Set.pm +++ b/lib/LaTeX/TikZ/Set.pm @@ -111,7 +111,7 @@ MOD: my $tag = $mod->tag; my $old = $mods{$tag} || []; for (@$old) { - next MOD if $_->[0]->cover($mod); + next MOD if $_->[0]->covers($mod); } push @{$mods{$tag}}, [ $mod, $last_mod++, $is_layer ]; push @mods, $mod;